Page MenuHomeSolus

Python 2 is Dead, Long Live Python 3
Open, HighPublic

Description

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:

  • kodi 18.x (once Kodi 19.1 is out on flathub, I suggest we officially deprecate kodi from the repo)
  • samba 4.9.x -> Updated to 4.10.x which supports Python 3 (but the Python bindings are disabled for now)
  • duplicity (waiting for version 0.8.x to be promoted as stable)

Planned Deprecation:

  • spyder (python 2 version only)

Solus Software:

  • Rewrite of ypkg in Go ( Development In-Progress)
  • Replace eopkg with sol written in Go (Design complete, Pending Implementation)
    • Rewrite of Software Center in C (Blocking on initial mock implementation of sol daemon)
    • System notifications to replace solus-update-checker
  • New Installer in C (Design In-Progress)
  • Internal scripts rewrites (In-Progress)

Python 2 Packages:

  • alabaster
  • android-tools
  • autopep8
  • bro
  • bup
  • bzr
  • caribou
  • catbox
  • cherrytree
  • chrome-gnome-shell
  • claws-mail
  • comar
  • comar-api
  • cycler
  • cython
  • dia
  • displaycal
  • doflicky
  • evemu
  • firewalld
  • flake8
  • fslint
  • gdal
  • gimp
  • git-cola
  • gnome-doc-utils
  • gnubg
  • gourmet
  • gpgme
  • gst-python-0.10
  • gwyddion
  • ibus-anthy
  • kaa-base
  • kaa-metadata
  • keybinder
  • kicad
  • kodi
  • kvirc
  • lash
  • ledger
  • libblockdev
  • libbytesize
  • libcaca
  • libgpod
  • libieee1284
  • liblouis
  • libpeas
  • libproxy
  • libuser
  • libxml2
  • libxslt
  • linux-tools
  • lldb
  • mailnag
  • matplotlib
  • mccabe
  • mcomix
  • mozjs
  • mozjs38
  • mutagen
  • mypaint
  • natron
  • nautilus-folder-icons
  • nautilus-python
  • newt
  • nmap
  • notify-python
  • notmuch
  • numpy
  • opencolorio
  • opencv
  • openimageio
  • os-installer
  • pam-wrapper
  • pbr
  • pep8
  • piksemel
  • pip
  • pisi
  • playonlinux
  • postgresql
  • printrun
  • psycopg2
  • ptyprocess
  • pulseaudio-dlna
  • py
  • pycodestyle
  • pyenchant
  • pyflakes
  • pygments
  • pygoocanvas
  • pygtksourceview
  • pyorbit
  • pyparsing
  • pytest-runner
  • python
  • python-appdirs
  • python-argparse
  • python-asn1
  • python-asn1crypto
  • python-asn1-modules
  • python-atomicwrites
  • python-attrs
  • python-automat
  • python-babel
  • python-backports
  • python-backports_abc
  • python-backports.functools_lru_cache
  • python-backports.ssl_match_hostname
  • python-bcrypt
  • python-beautifulsoup4
  • python-blinker
  • python-bottle
  • python-cairo
  • python-certifi
  • python-cffi
  • python-chardet
  • python-configobj
  • python-configparser
  • python-constantly
  • python-contextlib2
  • python-coverage
  • python-cparser
  • python-cryptography
  • python-dateutil
  • python-dbus
  • python-decorator
  • python-distutils-extra
  • python-docker-pycreds
  • python-docopt
  • python-docutils
  • python-entrypoints
  • python-enum34
  • python-enum-compat
  • python-evdev
  • python-fastimport
  • python-faulthandler
  • python-filelock
  • python-flaky
  • python-freezegun
  • python-funcsigs
  • python-functools32
  • python-futures
  • python-genty
  • python-geoip
  • python-gobject
  • python-gobject2
  • python-gtk2
  • python-httplib2
  • python-hyperlink
  • python-hypothesis
  • python-idna
  • python-imagesize
  • python-importlib-metadata
  • python-importlib-resources
  • python-incremental
  • python-inotify
  • python-ipaddress
  • python-itsdangerous
  • python-jedi
  • python-jinja
  • python-jsonschema
  • python-kiwisolver
  • python-lhafile
  • python-lxml
  • python-m2r
  • python-magic
  • python-markupsafe
  • python-mistune
  • python-mock
  • python-monotonic
  • python-more-itertools
  • python-netaddr
  • python-netifaces
  • python-nose
  • python-notify2
  • python-oauthlib
  • python-openssl
  • python-osinfo
  • python-packaging
  • python-parsimonious
  • python-parso
  • python-parted
  • python-pathlib2
  • python-pexpect
  • python-pillow
  • python-pluggy
  • python-polib
  • python-pretend
  • python-protobuf
  • python-psutil
  • python-pycurl
  • python-pyglet
  • python-pyhamcrest
  • python-pyjwt
  • python-pylibacl
  • python-pyliblzma
  • python-pyserial
  • python-pyside
  • python-pyside-tools
  • python-pysocks
  • python-pytest
  • python-pytest-cov
  • python-pytest-flake8
  • python-pytest-mock
  • python-pytz
  • python-pyusb
  • python-pywavelets
  • python-pyxattr
  • python-qt5
  • python-qtwebengine
  • python-reportlab
  • python-requests
  • python-requests-mock
  • python-requests-oauthlib
  • python-scandir
  • python-sdl2
  • python-service-identity
  • python-setproctitle
  • python-setuptools
  • python-setuptools-git
  • python-setuptools-scm
  • python-singledispatch
  • python-sip
  • python-six
  • python-slip
  • python-snowballstemmer
  • python-soupsieve
  • python-sphinx
  • python-sphinxcontrib-websupport
  • python-sphinx-rtd-theme
  • python-sqlalchemy
  • python-subprocess32
  • python-texttable
  • python-toml
  • python-tornado
  • python-tox
  • python-twisted
  • python-typing
  • python-urllib3
  • python-wcwidth
  • python-websocket-client
  • python-wheel
  • python-wrapt
  • python-zeroconf
  • python-zipp
  • python-zope.component
  • python-zope.deferredimport
  • python-zope.deprecation
  • python-zope.event
  • python-zope.hookable
  • python-zope.interface
  • python-zope.proxy
  • pyxdg
  • pyyaml
  • rpm
  • ruamel.yaml
  • sc-controller
  • scipy
  • scribus
  • shiboken
  • soapysdr
  • solus-sc
  • suricata
  • syncthing-gtk
  • tensorflow
  • trelby
  • util-linux
  • virtualenv
  • volume_key
  • vte2
  • wxPython
  • wxPython2
  • xcb-proto
  • youtube-dl-gui
  • ypkg

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

That list is not entirely correct, duplicity claims support for Python 2.7, 3.6 and 3.7.

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. 😢

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.

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. Their cmake scripts do not support enabling python bindings at all.

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.

DataDrake renamed this task from Python 2 is Dying, Long Live Python 3 to Python 2 is Dead, Long Live Python 3.Jan 6 2020, 2:00 AM

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

And os-installer

  • os-installer
    • python-cairo
    • python-geoip
    • python-gobject
    • python-parted

See also deps of deps.

Jacalz added a subscriber: Jacalz.Jan 6 2020, 8:54 AM

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...

@Jacalz scour and its deps would also need to be built for python 3...

Jacalz added a comment.EditedJan 6 2020, 2:55 PM

@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...

kyrios123 updated the task description. (Show Details)Jan 6 2020, 3:07 PM

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/

kyrios123 updated the task description. (Show Details)Feb 12 2020, 6:05 PM
kyrios123 added a comment.EditedApr 8 2020, 5:22 PM

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. 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.

@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

kyrios123 added a comment.EditedApr 8 2020, 6:35 PM

@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

@kyrios123 python is, but it wasn't until swig was added that it actually included the python libs. Check the pspec.

Inkscape version 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 :)

Inkscape version 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

DataDrake updated the task description. (Show Details)May 29 2020, 12:57 PM
DataDrake updated the task description. (Show Details)
serebit added a subscriber: serebit.EditedSep 3 2020, 8:04 PM

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.

DataDrake updated the task description. (Show Details)Dec 18 2020, 8:51 AM
Girtablulu updated the task description. (Show Details)Dec 18 2020, 9:00 AM

Why are icon themes here?

probably because search was after python so they poped up as well? gonna remove them

Girtablulu updated the task description. (Show Details)Dec 18 2020, 9:19 AM
DataDrake updated the task description. (Show Details)Dec 18 2020, 9:37 AM
DataDrake updated the task description. (Show Details)Dec 18 2020, 9:44 AM

sardi-icons can be removed and postgresql should be added.

I have a Python 3 port of os-installer awaiting review.

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)
Girtablulu updated the task description. (Show Details)Dec 23 2020, 7:39 PM
Girtablulu updated the task description. (Show Details)Dec 26 2020, 9:32 PM
Girtablulu updated the task description. (Show Details)Dec 27 2020, 12:42 PM
silke added a subscriber: silke.Dec 27 2020, 2:00 PM
Girtablulu updated the task description. (Show Details)Dec 28 2020, 5:07 PM
Girtablulu updated the task description. (Show Details)Dec 28 2020, 5:18 PM
Okra added a subscriber: Okra.Jan 1 2021, 6:25 AM
algent added a comment.Jan 1 2021, 2:15 PM

These packages are deprecated and the repos should be disabled.

pyexiv2
python2-astroid
python-logilab-common
python-base58
python-backports.unittest_mock
Girtablulu updated the task description. (Show Details)Jan 1 2021, 3:40 PM

deactivated and removed from the list above

joebonrichie updated the task description. (Show Details)Jan 16 2021, 2:09 PM
algent added a comment.EditedJan 20 2021, 9:26 PM

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
DataDrake updated the task description. (Show Details)Jan 21 2021, 5:14 PM
DrSheppard added a subscriber: DrSheppard.
algent added a comment.EditedFeb 12 2021, 4:42 PM

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
joebonrichie updated the task description. (Show Details)Feb 18 2021, 5:01 PM
joebonrichie updated the task description. (Show Details)Feb 19 2021, 3:31 PM

python-websocket-client is done which in turn means that python-backports.ssl_match_hostname can be deprecated.

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.

joebonrichie updated the task description. (Show Details)Feb 19 2021, 8:40 PM
joebonrichie updated the task description. (Show Details)Feb 19 2021, 8:57 PM
joebonrichie updated the task description. (Show Details)Feb 19 2021, 9:08 PM
joebonrichie updated the task description. (Show Details)
joebonrichie updated the task description. (Show Details)Feb 19 2021, 9:19 PM
joebonrichie updated the task description. (Show Details)Feb 19 2021, 9:35 PM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 7:23 AM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 7:44 AM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 7:52 AM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 7:56 AM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 8:00 AM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 8:02 AM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 8:05 AM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 8:07 AM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 8:17 AM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 8:19 AM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 8:26 AM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 8:41 AM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 9:56 AM
joebonrichie updated the task description. (Show Details)Feb 20 2021, 1:00 PM

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

Fixed:

  • ledger
  • libproxy
  • newt

Sent a PR for deprecation in solus-sc:

  • python-subprocess32
  • pygtksourceview
joebonrichie updated the task description. (Show Details)Mar 27 2021, 1:28 PM
ermo updated the task description. (Show Details)Mar 27 2021, 3:00 PM
algent added a comment.EditedFri, Apr 23, 8:27 PM

Sorted:

  • autopep8
  • flake8
  • postgresql
  • pycodestyle
  • pygoocanvas
  • pygtksourceview
  • python-subprocess32

Add to list:

  • fslint (another package that is on python2)
DataDrake updated the task description. (Show Details)Sun, Apr 25, 3:21 PM