[Python-Dev] PEP 394 - Clarification of what "python" command should invoke
songofacandy at gmail.com
Fri Sep 19 13:13:44 CEST 2014
There are many python2 only scripts with "#!/usr/bin/python" or
"#!/usr/bin/env python" shebang in the world.
I think Ubuntu and Fedora's strategy is better for now.
On Fri, Sep 19, 2014 at 7:12 PM, Bohuslav Kabrda <bkabrda at redhat.com> wrote:
> 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
>> - /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?
> Thanks a lot
> Slavek Kabrda
> Python-Dev mailing list
> Python-Dev at python.org
INADA Naoki <songofacandy at gmail.com>
More information about the Python-Dev