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

INADA Naoki 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
>> 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
> --
> Regards,
> Slavek Kabrda
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com

INADA Naoki  <songofacandy at gmail.com>

More information about the Python-Dev mailing list