[Python-Dev] PEP 394 - Clarification of what "python" command should invoke

Nick Coghlan ncoghlan at gmail.com
Fri Sep 19 12:07:02 CEST 2014


On 19 Sep 2014 17:38, "Bohuslav Kabrda" <bkabrda at redhat.com> wrote:
> - "Similarly, the more general python command should be installed
whenever any version of Python is installed and should invoke the same
version of Python as either python2 or python3."
>
> The important word in the second point is, I think, *whenever*. Trying to
apply these two points to Fedora 22 situation, I can think of several
approaches:
> - /usr/bin/python will always point to python3 (seems to go against the
first mentioned PEP recommendation)
> - /usr/bin/python will always point to python2 (seems to go against the
second mentioned PEP recommendation, there is no /usr/bin/python if python2
is not installed)

I think this is what should happen, and the PEP is currently wrong. When
writing the PEP, I don't think we accounted properly for the case where the
"system Python" has migrated to Python 3, but the "default Python for end
user scripts that don't specify otherwise" is still Python 2 (which is the
migration strategy both Fedora and Ubuntu are adopting).

How does this sound as a possible revised recommendation (keep in mind I
haven't checked this against the larger context yet):

"The more general python command should only be installed whenever the
corresponding version of Python is installed (whether python2 or python3)."

Regards,
Nick.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140919/f957dbf6/attachment.html>


More information about the Python-Dev mailing list