| Store | Cart

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

From: Nick Coghlan <ncog...@gmail.com>
Tue, 30 Sep 2014 21:30:56 +1000
On 30 September 2014 20:13, Bohuslav Kabrda <bkab...@redhat.com> wrote:
> ----- Original Message ----->> On 20 September 2014 00:23, Donald Stufft <don...@stufft.io> wrote:>> >>> > On Sep 19, 2014, at 10:16 AM, Barry Warsaw <bar...@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 [1]. 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:
https://docs.python.org/3/using/windows.html#python-launcher-for-windows

> 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
reads:

* 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 [3].

Cheers,
Nick.

[1] https://hg.python.org/peps/rev/3d16b0cd10bc
[2] https://hg.python.org/peps/rev/32b6619e9259
[3] https://hg.python.org/peps/rev/0418f146b50f

-- Nick Coghlan   |   ncog...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Pyth...@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/python-dev-ml%40activestate.com
Recent Messages in this Thread
Bohuslav Kabrda Sep 19, 2014 07:31 am
Nick Coghlan Sep 19, 2014 10:07 am
Bohuslav Kabrda Sep 19, 2014 10:12 am
INADA Naoki Sep 19, 2014 11:13 am
Barry Warsaw Sep 19, 2014 02:16 pm
Donald Stufft Sep 19, 2014 02:23 pm
Barry Warsaw Sep 19, 2014 02:41 pm
Steven DAprano Sep 19, 2014 03:03 pm
Guido van Rossum Sep 19, 2014 03:20 pm
Antoine Pitrou Sep 19, 2014 03:35 pm
Guido van Rossum Sep 19, 2014 03:40 pm
Barry Warsaw Sep 19, 2014 04:09 pm
Greg Ewing Sep 20, 2014 12:11 am
Marko Rauhamaa Sep 19, 2014 03:05 pm
Nick Coghlan Sep 19, 2014 10:44 pm
Bohuslav Kabrda Sep 30, 2014 10:13 am
Nick Coghlan Sep 30, 2014 11:30 am
Bohuslav Kabrda Sep 30, 2014 12:23 pm
Greg Ewing Sep 20, 2014 12:02 am
Donald Stufft Sep 20, 2014 12:06 am
R. David Murray Sep 19, 2014 03:17 pm
Messages in this thread