[Linux-SIG] Revisit of PEP 394 -- The "python" Command on Unix-Like Systems
cstratak at redhat.com
Tue Jul 25 08:02:04 EDT 2017
tl;dr Let's make sure that PEP 394 says "/usr/bin/python should be Python 3 by early 2020"
As Python 2's end of life is approaching, various Linux distributions are taking measures to tackle the issue, raising awareness, porting packages
and tools to Python 3, having only Python 3 preinstalled on their base images, and some have even made the ultimate change: making /usr/bin/python
point to the Python 3 interpreter. Some references .
Various upstream Python projects have also started down to the path to completely dropping Python 2 support in order to start taking full advantage
of Python 3 only features: http://www.python3statement.org/
In Fedora, we'd like to change /usr/bin/python to point to Python 3 by 2020 (when PEP 404 kicks in). However, we'd rather not do it without upstream's
support in PEP 394. Hence we would like to drive the change of PEP 394 to either say that /usr/bin/python should point to Python 3, or to say it is up
to the distribution maintainers. (And we would prefer the first option, so that the situation may eventually become consistent.)
The message we want to send is: "everything that can be ported to Python 3 should be ported, and everything that can run on Python 3 should run on it."
However, having /usr/bin/python point to Python 2 is continuing the concrete mindset for Linux users that "the default" version of Python is still Python 2.
Those mixed signals are especially problematic with maintainers that aren't familiar with the Python ecosystem (e.g. they only use a Python-based buildsystem).
PEP 394 says that it "is anticipated that there will eventually come a time where the third party ecosystem surrounding Python 3 is sufficiently
mature for this recommendation to be updated to suggest that the python symlink refer to python3 rather than python2," and that its recommendation
will be periodically reviewed.
We believe the ecosystem is now mature enough, and so we should set a specific target timeline for distributions to make that switch (aligning it
with the end of community support for the Python 2.7 branch).
Python Maintenance Team, Red Hat
More information about the Linux-sig