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

Bohuslav Kabrda bkabrda at redhat.com
Fri Sep 19 12:12:38 CEST 2014

----- Original Message -----

> 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).
Thanks, that was my thinking, too. 

> 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)."
It seems to me that it is a bit unclear what "corresponding" is. Would it make sense to explicitly say that "python" command should be installed whenever the distro-chosen default system Python is installed? 

> Regards,
> Nick.

Thanks a lot 

Slavek Kabrda 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140919/baec3246/attachment.html>

More information about the Python-Dev mailing list