Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (16 sloc) 3.66 KB

Why I can't remove Python 2 from my systems (yet)

The end of 2019 is fast approaching, and Python 2 will not be maintained past 2020. So I spent some time today trying to remove Python 2 from my systems. What follows is the result.

I have two computer systems I maintain at home. Work systems are different matters, which I won't go into in this post. Both of them run Debian GNU/Linux, unstable version. This is mostly relic of time when I went through Debian New Maintainers process. I didn't finish the process, but that's a different story... In general, I don't recommend running Debian unstable, since Debian testing is not that less up-to-date and much more stable. If you must run Debian unstable, apt-listbugs is your friend.

I will call these two systems "laptop" and "server". Laptop is what I sit in front of. It has a screen, and I run a web browser (Firefox) and terminals on it. Server is under the desk and headless. I connect to it using SSH and do the development on it.


The only software I have installed on laptop that depends on Python 2 is wicd, wicd-curses package in particular. It is a wireless network manager that I can run in terminal. The main alternative is NetworkManager, maybe I should try it again? On the other hand, I am pretty happy with my current setup.

Looking at the issue tracker, it seems Python 3 support is in progress, and its importance is set to high by the main developer. It seems promising, so I just subscribed to the issue.


On the development server, three packages depend on Python 2. One is LLVM, llvm-9-dev package in particular. This is due to lit, LLVM Integrated Tester.

I can't figure out the current status of Python 3 support for lit. Looking at the commit log, it seems to get a stream of Python 3 fixes, most recently in the last month (October 2019). For example, Fix several Python 2/3 compatibility issues and tests. My best guess is that Python 3 support is done in best effort basis and Python 2 is still the "official" way to run lit, and that's why Debian maintainer set the dependency to Python 2.

The next is Mercurial, a distributed version control system. Projects I care about, for example Firefox, uses Mercurial, so I want to have it working.

According to Mercurial Wiki, Python 3 support is currently in "beta". Complicating the matter is that Mercurial is extensible, and many third party extensions have not yet been ported to Python 3.

The last is npm, a package manager for Node.js. This is due to GYP, standing for Generate Your Projects. It is used to build native addon modules for Node.js.

The state of GYP seems similar to lit. The commit log shows commits like Fix Python 3 incompatibilities. On the one hand, this is great. On the other hand, it shows Python 3 support isn't official, since these issues wouldn't have passed CI otherwise.


All in all, it seems to be in pretty good shape. wicd port is in progress, and Mercurial port is already done. What's needed for lit and GYP seems to be the official declaration (and addition to CI) of Python 3 support. I plan to repeat this exercise the next year, after the deadline has passed.

You can’t perform that action at this time.