[Python-Dev] Another update for PEP 394 -- The "python" Command on Unix-Like Systems
vstinner at redhat.com
Wed Feb 13 11:45:44 EST 2019
Some more context about Petr's change, Fedora, RHEL and Red Hat.
At the latest Language Summit (2018), Petr detailed the state of the
migration to Python 3 and how Python 2 is and will be handled at Red
Hat; "Linux distributions and Python 2" talk with Matthias Klose (who
works on Debian/Ubuntu):
Petr explained in a comment on this change that /usr/bin/python is
configurable in the incoming RHEL8:
"I'm responsible for how this is handled in RHEL 8 beta, where
`/usr/bin/python` is configurable (though configuring it is
discouraged). I don't recommend that in the PEP – I don't think it
needs to cover distros that need to lock in the behavior of
`/usr/bin/python` for a decade."
More details in his nice "Python in RHEL 8" article:
RHEL8 has specific challenges since it will be released around Python2
end-of-life with customers who are still running Python 2, but has
also to be prepared for the bright Python 3 world since RHEL is
usually supported for 10 years (if not longer).
Petr and me are working for Red Hat on Fedora and RHEL. My team is
helping on actively removing Python 2 from Fedora:
"Python 2 will be deprecated in Fedora. Packagers can mark any other
Python 2 packages as deprecated as well."
* https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 --
* https://fedoraproject.org/wiki/Changes/Python_3_as_Default --
implemented in Fedora 23
The base installation of Fedora only provides "python3" (no "python"
nor "python2") since Fedora 23 (released in 2015), as does Ubuntu
nowadays. You get get "python" on Fedora by installing a special
"python-unversioned-command" package :-)
Le mer. 13 févr. 2019 à 16:28, Petr Viktorin <encukou at gmail.com> a écrit :
> PEP 394 says:
> > This recommendation will be periodically reviewed over the next few
> > years, and updated when the core development team judges it
> > appropriate. As a point of reference, regular maintenance releases
> > for the Python 2.7 series will continue until at least 2020.
> I think it's time for another review.
> I'm especially worried about the implication of these:
> - If the `python` command is installed, it should invoke the same
> version of Python as the `python2` command
> - scripts that are deliberately written to be source compatible
> with both Python 2.x and 3.x [...] may continue to use `python` on
> their shebang line.
> So, to support scripts that adhere to the recommendation, Python 2
> needs to be installed :(
> Please see this PR for details and a suggested change:
> Python-Dev mailing list
> Python-Dev at python.org
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/vstinner%40redhat.com
Night gathers, and now my watch begins. It shall not end until my death.
More information about the Python-Dev