getsolus / packages

Solus Package Monorepo & Issue Tracker
62 stars 78 forks source link

Python 2 is Dead, Long Live Python 3 (T8207) #270

Open celticmagic opened 1 year ago

celticmagic commented 1 year ago
Beatrice T. Meyers (#DataDrake), 2019-08-04 20:43:54 UTC

Let's use this task to keep track of things stuck on Python 2 so that we know when we can retire Python 2 or whether or not to deprecate them. Stuck on Python 2: - [x] kodi 18.x (once Kodi 19.1 is out on flathub, I suggest we officially deprecate kodi from the repo) - [x] samba 4.9.x -> Updated to 4.10.x which supports Python 3 (but the Python bindings are disabled for now) - [x] duplicity (waiting for version 0.8.x to be promoted as stable) Planned Deprecation: - [x] spyder (python 2 version only) - [x] nautilus-admin Solus Software: - [ ] Switch to GNOME SC and KDE Discover (PoC ready) - [ ] Retire solus-sc and remove it from the package repo - [ ] Ensure that KDE Discover can use PackageKit to replace LDM functionality (PoC ready) - [ ] Port eopkg to py3 and compile it with nuitka (PoC ready and in testing) - [ ] Test that GNOME SC and KDE Discover work as expected with eopkg py3 PK backend - [ ] Test that KDE Dsicvoer can use the eopkg py3 PackageKit backend to replace LDM functionality (PoC ready) - [x] Port ypkg to py3 and compile it with nuitka (Done, in production on build server) - [x] Switch to using the Calamares installer (Done) - [x] Internal scripts rewrites (Done) Python 2 Packages: - [x] alabaster - [x] android-tools - [x] autopep8 - [x] bro - [x] bup - [ ] bzr - [x] caribou - [ ] catbox - [x] cherrytree - [x] chrome-gnome-shell - [x] claws-mail - [ ] comar - [ ] comar-api - [x] cycler - [x] cython - [ ] dia - [x] displaycal - [ ] doflicky - [x] evemu - [x] firewalld - [x] flake8 - [x] fslint - [x] gdal - [ ] gimp - [x] git-cola - [x] gnome-doc-utils - [x] gnubg - [x] gourmet - [x] gpgme - [x] gst-python-0.10 - [x] gwyddion - [x] ibus-anthy - [x] kaa-base - [x] kaa-metadata - [ ] keybinder - [x] kicad - [x] kodi - [x] kvirc - [x] lash - [x] ledger - [x] libblockdev - [x] libboost - [x] libbytesize - [x] libcaca - [x] libgpod - [x] libieee1284 - [x] liblouis - [x] libpeas - [x] libproxy - [x] libuser - [x] libxml2 - [x] libxslt - [x] linux-tools - [x] lldb - [ ] llvm-clang (.py files are py2) - [x] mailnag - [x] matplotlib - [x] mccabe - [x] mcomix - [x] mozjs - [x] mozjs38 - [x] mutagen - [x] mypaint - [x] natron - [x] nautilus-folder-icons - [x] nautilus-python - [x] newt - [x] nmap - [x] notify-python - [x] notmuch - [x] opencolorio - [x] opencv - [x] openimageio - [ ] os-installer - [x] pam-wrapper - [x] pbr - [x] pep8 - [ ] piksemel - [ ] pip - [ ] pisi - [x] playonlinux - [x] postgresql - [x] printrun - [x] psycopg2 - [x] ptyprocess - [x] pulseaudio-dlna - [x] py - [x] pycodestyle - [x] pyenchant - [x] pyflakes - [x] pygments - [x] pygoocanvas - [x] pygtksourceview - [ ] pyorbit - [x] pyparsing (update blocked) - [x] pytest-runner (update blocked) - [ ] python - [ ] python-absl-py - [x] python-appdirs - [x] python-argparse - [x] python-asn1 - [x] python-asn1crypto - [x] python-asn1-modules - [x] python-atomicwrites - [x] python-attrs (Update blocked) - [x] python-automat - [x] python-babel - [ ] python-backports - [x] python-backports_abc - [x] python-backports.functools_lru_cache - [x] python-backports.ssl_match_hostname - [x] python-bcrypt - [x] python-beautifulsoup4 - [x] python-blinker - [x] python-bottle - [ ] python-cairo - [x] python-certifi - [x] python-cffi - [x] python-chardet - [x] python-configobj - [x] python-configparser - [x] python-constantly - [x] python-contextlib2 - [x] python-coverage (update blocked) - [x] python-cparser - [x] python-cryptography - [x] python-dateutil - [ ] python-dbus - [x] python-decorator - [ ] python-distutils-extra - [x] python-docker-pycreds - [x] python-docopt - [x] python-docutils - [x] python-entrypoints - [x] python-enum34 - [x] python-enum-compat - [x] python-evdev https://github.com/getsolus/packages/commit/a0acaf4e849dc6ce50f0d3704bf25bc23cd59f63 - [x] python-fastimport - [x] python-faulthandler - [x] python-filelock - [x] python-flaky - [x] python-freezegun - [x] python-funcsigs - [x] python-functools32 - [x] python-futures - [x] python-genty - [ ] python-geoip - [ ] python-gobject - [ ] python-gobject2 - [ ] python-gtk2 - [x] python-httplib2 - [x] python-hyperlink - [x] python-hypothesis (update blocked) - [x] python-idna - [x] python-imagesize - [x] python2-importlib-metadata - [x] python-importlib-resources (update blocked) - [x] python-incremental - [x] python-inotify - [x] python-ipaddress - [x] python-itsdangerous - [x] python-jedi - [x] python-jinja - [x] python-jsonschema - [x] python-kiwisolver - [x] python-lhafile - [x] python-lxml - [x] python-m2r - [ ] python-magic - [x] python-markupsafe - [x] python-mistune - [x] python-mock (update blocked) - [x] python-monotonic - [x] python-more-itertools (update blocked) - [x] python-netaddr - [x] python-netifaces - [x] python-nose - [x] python-notify2 - [x] python-oauthlib - [x] python-openssl - [x] python-osinfo - [x] python2-packaging - [x] python-parsimonious - [x] python-parso - [ ] python-parted - [ ] python-pathlib2 - [x] python-pexpect - [x] python-pillow - [x] python2-pluggy - [x] python-polib - [x] python-pretend - [x] python-protobuf - [x] python-psutil - [ ] python-pycurl - [x] python-pyglet - [x] python-pyhamcrest - [x] python-pyjwt - [x] python-pylibacl - [ ] python-pyliblzma - [x] python-pyserial - [x] python-pyside - [x] python-pyside-tools - [x] python-pysocks - [x] python2-pytest - [x] python-pytest-cov - [x] python-pytest-flake8 - [x] python-pytest-mock - [x] python-pytz - [x] python-pyusb - [x] python-pywavelets - [x] python-pyxattr - [x] python-qt5 - [x] python-qtwebengine - [x] python-reportlab - [x] python-requests - [x] python-requests-mock - [x] python-requests-oauthlib - [x] python-scandir - [x] python-sdl2 - [x] python-service-identity - [x] python-setproctitle - [ ] python-setuptools - [x] python-setuptools-git - [x] python2-setuptools-scm - [x] python-singledispatch - [x] python-sip - [x] python-six - [x] python-slip - [x] python-snowballstemmer - [x] python-soupsieve - [x] python-sphinx - [x] python-sphinxcontrib-websupport - [x] python-sphinx-rtd-theme - [x] python-sqlalchemy - [x] python-subprocess32 - [x] python-texttable - [x] python-toml - [x] python-tornado - [x] python-tox - [x] python-twisted - [x] python-typing - [x] python-urllib3 - [x] python-urlgrabber - [x] python-wcwidth - [x] python-websocket-client - [ ] python-wheel - [x] python-wrapt - [x] python-zeroconf - [x] python-zipp (update blocked) - [x] python-zope.component - [x] python-zope.deferredimport - [x] python-zope.deprecation - [x] python-zope.event - [x] python-zope.hookable - [x] python-zope.interface - [x] python-zope.proxy - [ ] python-zstd - [x] python2-numpy - [x] pyxdg - [ ] pyyaml - [x] rpm - [ ] ruamel.yaml - [x] sc-controller https://github.com/getsolus/solus-sc/pull/284/commits/3b2ca300a9f9ceb090a557e565ad9d5d0c296f1d - [x] scipy - [x] scons - [x] scribus - [x] shiboken - [x] soapysdr - [ ] solus-sc - [ ] suricata - [x] syncthing-gtk - [x] tensorflow - [x] trelby - [x] util-linux - [x] virtualenv - [x] volume_key - [x] vte2 - [x] wxPython - [x] wxPython2 - [x] xcb-proto - [x] youtube-dl-gui - [x] ypkg
celticmagic commented 1 year ago
Algent Albrahimi (#algent), 2019-10-07 07:32:05 UTC

Applications like this? ``` terminator natron kicad catbox duplicity utopia-documents mypaint openimageio ```
celticmagic commented 1 year ago
DerRidda (#DerRidda), 2019-10-07 09:08:33 UTC

That list is not entirely correct, duplicity claims support for Python 2.7, 3.6 and 3.7.
celticmagic commented 1 year ago
Pierre-Yves (#kyrios123), 2019-10-07 09:43:22 UTC

>>! In T8207#159095, #DerRidda wrote: > That list is not entirely correct, duplicity claims support for Python 2.7, 3.6 and 3.7. Current stable version of duplicity 0.7.x doesn't support python 3. Development version (0.8) however does. No issue here, we can quietly wait until 0.8 is promoted to stable. - `calibre` is an interesting one, it will allow us to drop support for multiple python2 packages. - if someone managed to build Qt 4 Python (previously known as PySide2), we'll be able to discontinue python-pyside, shiboken and some more qt4 stuffs, so I guess this is an interresting one. I tried already but I never succeeded to get it to build and I couldn't find anyone to help so I gave up. ?
celticmagic commented 1 year ago
Alex Vorobyev (#aleksvor), 2019-10-07 09:50:47 UTC

>>! In T8207#159096, #kyrios123 wrote: > if someone managed to build Qt 4 Python (previously known as PySide2), we'll be able to discontinue python-pyside, shiboken and some more qt4 stuffs, so I guess this is an interresting one. I tried already but I never succeeded to get it to build and I couldn't find anyone to help so I gave up. ? I tried it too (I would want to use PySide2 in Cutter, currently our Cutter build doesn't support Python plugins), but I failed to build it unfortunately. There was a strange error about bindings generation IIRC. BTW, I tried to build it from all-in-one tarball (the one that includes pyside2, shiboken2 and other related stuff). I think maybe I could try building separate packages from separate tarballs.
celticmagic commented 1 year ago
Joey Riches (#joebonrichie), 2019-10-07 11:34:35 UTC

A bug in `geos` autotools scripts means it can't be switched to python3. Infact, support only explicitly goes as high as python 3.3, as seen [here](https://github.com/libgeos/geos/commit/6cecfc14466e63b830183abfd72f29d3b3c75af9). Their cmake scripts do not support enabling python bindings at all.
celticmagic commented 1 year ago
Pierre-Yves (#kyrios123), 2019-10-13 10:40:31 UTC

Patches for calibre python 3 built have been submitted which allows to switch to python 3 or drop python 2 support in small dozen packages.
celticmagic commented 1 year ago
Beatrice T. Meyers (#DataDrake), 2020-01-06 02:14:14 UTC

Just a reminder that we should now be moving everything we can to Python 3 only, with no new packages for Python 2. The following packages related are exempt and should retain python 2 support until `comar`, `eopkg`, `solus-sc`, and `ypkg` are replaced: - [ ] comar - [ ] solus-sc - [ ] pisi (eopkg) - [ ] piksemel - [ ] python-pycurl - [ ] python-urlgrabber - [ ] python-gobject - [ ] ypkg - [ ] python-configobj - [ ] python-six - [ ] pyyaml - [ ] ruamel_yaml
celticmagic commented 1 year ago
Beatrice T. Meyers (#DataDrake), 2020-01-06 08:21:52 UTC

And `os-installer` - [ ] os-installer - [ ] python-cairo - [ ] python-geoip - [ ] python-gobject - [ ] python-parted See also deps of deps.
celticmagic commented 1 year ago
Jacob (#Jacalz), 2020-01-06 08:54:25 UTC

An issue I have been facing was that I couldn’t get Inkscape to find `scour` if I built it using Python 3, only when using Python 2. I don’t know if it is something strange with Inkscape or Scour though. Scour does have python 3 support so we can just switch it over if someone makes Inkscape pick it up correctly...
celticmagic commented 1 year ago
Beatrice T. Meyers (#DataDrake), 2020-01-06 09:09:47 UTC

#Jacalz `scour` and its deps would also need to be built for python 3...
celticmagic commented 1 year ago
Jacob (#Jacalz), 2020-01-06 16:20:50 UTC

>>! In T8207#162808, #DataDrake wrote: > #Jacalz `scour` and its deps would also need to be built for python 3... Yes I know, but the issue is that Inkscape currently uses Python2 and won't pick up the python 3 version. Hopefully the 1.0 release of inkscape can bring some light on to fixing this, it does switch to python3 from what I have heard. This is also blocked by `inkscape` in other words...
celticmagic commented 1 year ago
Kim Forsman (#endumiuz), 2020-01-12 10:25:31 UTC

> duplicity (waiting for version 0.8.x to be promoted as stable) It seems to be considered stable now: https://code.launchpad.net/duplicity http://duplicity.nongnu.org/
celticmagic commented 1 year ago
Pierre-Yves (#kyrios123), 2020-04-08 17:28:52 UTC

>>! In T8207#159107, #joebonrichie wrote: > A bug in `geos` autotools scripts means it can't be switched to python3. Infact, support only explicitly goes as high as python 3.3, as seen [here](https://github.com/libgeos/geos/commit/6cecfc14466e63b830183abfd72f29d3b3c75af9). Their cmake scripts do not support enabling python bindings at all. Does anyone know what requires python to be enabled in geos ? qgis, gdal, python-shapely are already using python 3 so if they really needed it, it would be an issue already. libspatialite can be built against geos without enabling python.
celticmagic commented 1 year ago
Beatrice T. Meyers (#DataDrake), 2020-04-08 17:35:33 UTC

#kyrios123 Looks like it was randomly added during an update: https://dev.getsol.us/D2573 You're the one who reviewed and landed it xD
celticmagic commented 1 year ago
Pierre-Yves (#kyrios123), 2020-04-08 18:35:43 UTC

>>! In T8207#168893, #DataDrake wrote: > #kyrios123 Looks like it was randomly added during an update: https://dev.getsol.us/D2573 > > You're the one who reviewed and landed it xD Euuhh it's there from the Initial version that was authored by you R893:b525d0812cfa ? I'll remove it and give a try
celticmagic commented 1 year ago
Beatrice T. Meyers (#DataDrake), 2020-04-08 18:49:12 UTC

#kyrios123 python is, but it wasn't until `swig` was added that it actually included the python libs. Check the pspec.
celticmagic commented 1 year ago
Jacob (#Jacalz), 2020-04-13 18:18:39 UTC

Inkscape version [0.92.5](https://inkscape.org/release/inkscape-0.92.5/) was recently released with support for Python3 extensions. It hopefully means that we can drop support for python2 in a couple more packages, so I figured that it was relevant to inform about :)
celticmagic commented 1 year ago
Pierre-Yves (#kyrios123), 2020-04-13 20:16:01 UTC

>>! In T8207#169128, #Jacalz wrote: > Inkscape version [0.92.5](https://inkscape.org/release/inkscape-0.92.5/) was recently released with support for Python3 extensions. It hopefully means that we can drop support for python2 in a couple more packages, so I figured that it was relevant to inform about :) I guess we'll wait for inkscape 1.0
celticmagic commented 1 year ago
Campbell Jones (#serebit), 2020-09-03 20:04:53 UTC

I made a PR for switching `os-installer` over to Python 3. I know the new installer is pending implementation, but the changes required for py3 are so small that I think it's worth switching over in the meantime.
celticmagic commented 1 year ago
Algent Albrahimi (#algent), 2020-12-18 09:09:42 UTC

Why are icon themes here?
celticmagic commented 1 year ago
FvG (#Girtablulu), 2020-12-18 09:17:18 UTC

probably because search was after python so they poped up as well? gonna remove them
celticmagic commented 1 year ago
Algent Albrahimi (#algent), 2020-12-18 12:48:22 UTC

`sardi-icons` can be removed and `postgresql` should be added.
celticmagic commented 1 year ago
Campbell Jones (#serebit), 2020-12-18 12:54:01 UTC

I have a Python 3 port of `os-installer` awaiting review.
celticmagic commented 1 year ago
Beatrice T. Meyers (#DataDrake), 2020-12-18 12:54:20 UTC

#algent Done.
celticmagic commented 1 year ago
Algent Albrahimi (#algent), 2020-12-23 19:20:53 UTC

**Swtched to python3:** - bup - git-cola - python-pyxattr - mailnag (Already in python3, just need to change python-dbus with python3-dbus) **Add to the list:** - gimp **Other:** - lash `[Package] Including empty directory: /usr/lib/python2.7/site-packages` (It is just an empty directory)
celticmagic commented 1 year ago
Algent Albrahimi (#algent), 2021-01-01 14:15:00 UTC

These packages are deprecated and the repos should be disabled. ``` pyexiv2 python2-astroid python-logilab-common python-base58 python-backports.unittest_mock ```
celticmagic commented 1 year ago
FvG (#Girtablulu), 2021-01-01 15:40:42 UTC

deactivated and removed from the list above
celticmagic commented 1 year ago
Algent Albrahimi (#algent), 2021-01-21 12:42:08 UTC

**Sorted:** - firewalld - gnubg - lash - opencolorio - openimageio - python-jsoncschema - python-lhafile - python-pytest-flake8 - python-pyusb - python-pywavelets - python-setuptools-git - python-slip - tensorflow **Unmark as done** - python-bottle
celticmagic commented 1 year ago
Algent Albrahimi (#algent), 2021-02-18 16:23:17 UTC

EDIT: There is some progress here, 10 more packages done: - cherrytree - chrome-gnome-shell - cycler - evemu - matplotlib - python-decorator - python-kiwisolver - python-wrapt - scipy - xcb-proto
celticmagic commented 1 year ago
Joey Riches (#joebonrichie), 2021-02-19 15:32:04 UTC

`python-websocket-client` is done which in turn means that `python-backports.ssl_match_hostname` can be deprecated.
celticmagic commented 1 year ago
Joey Riches (#joebonrichie), 2021-02-19 20:33:00 UTC

`python-jedi` can be deprecated, it' s not being used by anything and we have `python3-jedi`. Although, we may want to update `python-jedi` to py3 and drop `python3-jedi` instead to keep naming more consistent.
celticmagic commented 1 year ago
Joey Riches (#joebonrichie), 2021-02-23 17:07:12 UTC

To be deprecated: `python-subprocess32` `vte2-docs` (leftover) `python-argparse` `pygoocanvas` `pygtksourceview` `python3-jedi` (needs co-ordination) Most of the low hanging fruit has be done for now, the next lot of python2 removal will likely come from packages upgrading to py3 such as syncthing, gourmet, print-run, mypaint, displayrun. Current low-hanging fruit: `pam-wrapper` `psycopg2` `gdal` `soapysdr`
celticmagic commented 1 year ago
Algent Albrahimi (#algent), 2021-03-27 12:57:25 UTC

Fixed: - ledger - libproxy - newt Sent a [PR](https://github.com/getsolus/solus-sc/pull/81) for deprecation in [solus-sc](https://github.com/getsolus/solus-sc): - python-subprocess32 - pygtksourceview
celticmagic commented 1 year ago
Algent Albrahimi (#algent), 2021-04-25 14:15:51 UTC

**Sorted:** - autopep8 - flake8 - postgresql - pycodestyle - pygoocanvas - pygtksourceview - python-subprocess32 **Add to list:** - fslint (another package that is on python2)
celticmagic commented 1 year ago
Algent Albrahimi (#algent), 2021-05-30 16:01:26 UTC

**Sorted:** - mccabe - mozjs38 - nautilus-admin - nautilus-folder-icons - nautilus-python - opencv - python-argparse - python-entrypoints - python-functools32 - python-qt5 - rpm
celticmagic commented 1 year ago
Algent Albrahimi (#algent), 2021-07-09 07:37:27 UTC

We made another progress: **Sorted:** - libcaca - liblouis - lldb - natron - python-bcrypt - python-docopt - python-inotify - python-netaddr - python-netifaces - python-pyside - python-pyside-tools - python-setproctitle - python-sip - pulseaudio-dlna - shiboken - syncthing-gtk
celticmagic commented 1 year ago
FvG (#Girtablulu), 2021-07-09 07:43:44 UTC

gonna edit it
celticmagic commented 1 year ago
Georgy (#DrSheppard), 2021-08-19 16:26:10 UTC

If i'm not mistaken #joebonrichie and #algent updated this packages: python-chardet python-certifi python-jinja python-markupsafe python-notify2 python-parso python-tornado python-zeroconf Thx for our work!!!
ReillyBrogan commented 10 months ago

I'M SO SORRY ALGENT

/me adds python-zstd to list (for ypkg)

ermo commented 5 months ago

This is the list of py2 scripts in still in common/:

ermo@solbox:~/repos/getsolus/soluspkgs/common
$ rg '/usr/bin/env python' |grep -v python3 |sort
Legacy/Scripts/dep_check.py:#!/usr/bin/env python
Legacy/Scripts/find-old-packages.py:#!/usr/bin/env python2.7
Scripts/dloader.py:#!/usr/bin/env python
Scripts/epcsearch.py:#!/usr/bin/env python
Scripts/ep-update.py:#!/usr/bin/env python
Scripts/find_deps.py:#!/usr/bin/env python2
Scripts/gettag.py:#!/usr/bin/env python
Scripts/latent-rebuilds.py:#!/usr/bin/env python2.7
Scripts/pbump.py:#!/usr/bin/env python
Scripts/yauto.py:#!/usr/bin/env python
Scripts/yconvert.py:#!/usr/bin/env python