[Python-Dev] [PEPs] Support the /usr/bin/python2 symlink upstream

Kerrick Staley mail at kerrickstaley.com
Sun Mar 6 22:11:07 CET 2011


> Heh, you are the author of the PEP :-)

> You'll find the source of your PEP in

> http://svn.python.org/projects/peps/trunk/

> Please provide Nick with a patch/updated version; if you want to,
> you can also get write access to the PEP repository.

I should've mentioned that I'd like a consensus (or a lack of protest) on
the changes related to these snippets:
-"python will refer to the same target as either python2 or python3,
depending on the specific distribution and system"
-"the make install command and the Mac OS X installer in the 2.7 version of
CPython will be adjusted to create the new python2 command in addition to
the existing python and python2.7 commands"
-"Exclusions of MS Windows"

The other changes are in the attached diff. The source needs to be reflown
if line length is to be kept consistent. I don't feel I need write access to
the repository at this point.

-Kerrick Staley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110306/5934db82/attachment.html>
-------------- next part --------------
--- pep-0394.txt	2011-03-05 01:06:50.000000000 -0600
+++ pep-0394-revised.txt	2011-03-06 15:07:42.373333338 -0600
@@ -1,5 +1,5 @@
 PEP: 394
-Title: The "python" command on Unix-Like Systems
+Title: The "python" Command on Unix-Like Systems
 Version: $Revision$
 Last-Modified: $Date$
 Author: Kerrick Staley <mail at kerrickstaley.com>,
@@ -37,11 +37,7 @@
 * 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``.
-* For the time being, it is recommended that ``python`` should refer to
-  ``python2``, except on distributions which include only ``python3`` in their
-  base install, or those that wish to push strongly for migration of user
-  scripts to Python 3.
-* In order to tolerate differences across platforms, all new code that needs
+* In order to tolerate differences across platforms, all code that needs
   to invoke the Python interpreter should not specify ``python``, but rather
   should specify either ``python2`` or ``python3`` (or the more specific
   ``python2.x`` and ``python3.x`` versions; see the Notes).
@@ -68,7 +64,7 @@
 ``python`` command to Python 2, some now alias it to Python 3. Some of
 the former also do not provide a ``python2`` command; hence, there is
 currently no way for Python 2 code (or any code that invokes the Python 2
-interpreter directly rather than via ``sys.executable``) to reliably run on
+interpreter) to reliably run on
 all systems without modification, as the ``python`` command will invoke the
 wrong interpreter version on some systems, and the ``python2`` command will
 fail completely on others. The recommendations in this PEP provide a very
@@ -113,9 +109,10 @@
   ``python`` file, they can do so without inadvertently deleting the
   previously installed binary.
 * As an alternative to the recommendation presented above, some distributions
-  may choose to leave the ``python`` command itself undefined, leaving
-  sysadmins and users with the responsibility to choose their own preferred
-  version to be made available as the ``python`` command.
+  that have traditionally left the ``python`` command undefined may continue
+  to do so, leaving
+  sysadmins and users with the responsibility of making their own preferred
+  version available as the ``python`` command.
 * If the Python 2 interpreter becomes uncommon, scripts should nevertheless
   continue to use the ``python3`` convention rather that just ``python``. This
   will ease transition in the event that yet another major version of Python


More information about the Python-Dev mailing list