[Python-Dev] PEP 394 - Clarification of what "python" command should invoke
ncoghlan at gmail.com
Tue Sep 30 13:30:56 CEST 2014
On 30 September 2014 20:13, Bohuslav Kabrda <bkabrda at redhat.com> wrote:
> ----- Original Message -----
>> On 20 September 2014 00:23, Donald Stufft <donald at stufft.io> wrote:
>> > On Sep 19, 2014, at 10:16 AM, Barry Warsaw <barry at python.org> wrote:
>> > If the user wants to invoke Python 3, it's not hard to type 'python3' and I
>> > think that's the message we should be spreading. That already seems pretty
>> > ingrained in user habits afaict.
>> > My biggest problem with ``python3``, is what happens after 3.9. I know
>> > Guido
>> > doesn’t particularly like two digit version numbers and it’s been suggested
>> > on
>> > this list that instead of 3.10 we’re likely to move directly into 4.0
>> > regardless of
>> > if it’s a “big” change or not.
>> FWIW, I think we actually do this better on Windows these days, where
>> PEP 397 made "py" a switchable entry point. I'd like to bring the same
>> scheme to POSIX systems at some point, but that's a *long* way down
>> the todo list (like, so far down I can't even see it any more). I'd be
>> willing to review proposals, though :)
> We did a similar thing with Ruby in Fedora, it's called Rubypick . Is that a direction worth pursuing?
Yes, I think so. The general idea would be to take the PEP 397
launcher CLI and propose a similar API for *nix systems:
> Also, what is actually result of this thread? AFAICS the PEP still hasn't changed. IMO when there's only python3 installed, there should be no /usr/bin/python, which also seems to be aligned with what Guido says. Would it be possible to update the PEP accordingly?
Thanks for the prompt. I just pushed an update [1,2] to merge the
previously incorrect bullet point with the one following it, so it now
* The more general ``python`` command should be installed whenever
any version of Python 2 is installed and should invoke the same version of
Python as the ``python2`` command (however, note that some distributions
have already chosen to have ``python`` implement the ``python3``
command; see the `Rationale`_ and `Migration Notes`_ below).
I also pushed a few tweaks to account for the extension of Python 2.7
maintenance, and to change the verb tense to reflect the fact this was
implemented ages ago .
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Dev