python2 removal

Jon Turney jon.turney@dronecode.org.uk
Sun Jan 15 12:52:43 GMT 2023


This has come up in discussion a few times, and is now well overdue, I 
think.

Python 2.7 is the last python2 version, which was sunsetted on January 
1, 2020.

1)  I will be making the following hopefully uncontroversial changes to 
cygport in it's next release:

* Make 'inherit python2{,-disutils,-wheel}' an error
* Make 'inherit python-wheel' with PYTHON_WHEEL_VERSIONS containing "2" 
or "2.*" an error.

2) Looking for packages whose names don't start with 'python', but where 
the current version installs something into 
/usr/lib/python2.7/site-packages/ and/or into /usr/bin/ with a shebang 
containing 'python2', the following packages appear to need rebuilding 
for python3:

package             source package     maintainer

alacarte                               ORPHANED (Yaakov Selkowitz)
avahi-ui-tools      avahi              ORPHANED (Yaakov Selkowitz)
buildbot-slave                         Jon Turney [1]
bzr-fastimport      python-fastimport  Ken Brown
bzr                                    Jari Aalto
caribou                                ORPHANED (Yaakov Selkowitz)
cfget                                  Jari Aalto
chm2pdf                                ORPHANED (Yaakov Selkowitz)
codeville                              Jari Aalto
cvs2svn                                ORPHANED (Yaakov Selkowitz)
d-feet                                 ORPHANED (Yaakov Selkowitz)
getmail                                Jari Aalto
gnome-activity-journal                 ORPHANED (Yaakov Selkowitz)
guake                                  ORPHANED (Yaakov Selkowitz)
kf5-kapidox                            ORPHANED (Yaakov Selkowitz)
mozo                                   ORPHANED (Yaakov Selkowitz)
net-snmp-python     net-snmp           David Rothenberger [2]
offlineimap                            Jari Aalto
picard                                 ORPHANED (Dr. Volker Zell)
planet                                 ORPHANED (Yaakov Selkowitz)
rpm-python          rpm                Pavel Fedin
spambayes                              ORPHANED  (Jari Aalto)
tailor                                 Jari Aalto
terminator                             Mike DePaulo
urlgrabber                             Jari Aalto
xml2po              gnome-doc-utils    ORPHANED (Yaakov Selkowitz)
xxdiff                                 ORPHANED (Yaakov Selkowitz)

[1] effectively obsoleted by buildbot-worker, so should just be removed.
[2] also needs rebuilding for perl 5.32

3) There might also still be some other packages lurking which just 
install a script with a shebang containing 'python', and assume that 
python is python2.  I don't know how we could identify those.

4) With that done, one would hope we could just expire all packages as
with names matching:

python27
python27-* (127 of)
python2-*
python-*

But there may be some cases not caught in step 2), where

- the package is not a python module (i.e. source package is not python-*)
- the package shouldn't be removed because it's a dependency of something

So those will need to be identified and inspected to determine what 
should happen to them.

5) Other post-cleanup tasks

e.g. python-beautifulsoup can become a virtual package for python-bs4, 
once that name isn't being used by the python2-only beautifulsoup 3.x.


More information about the Cygwin-apps mailing list