[Python-Dev] PEP 394 request for pronouncement (python2 symlink in *nix systems)

Barry Warsaw barry at python.org
Mon Feb 13 23:08:45 CET 2012


On Feb 13, 2012, at 12:31 PM, Nick Coghlan wrote:

>I think Antoine makes a good point about ease of introspection when
>you have multiple versions in the same series installed, so I'd be
>fine with:
>- updating the PEP recommendation to say that either form of link is
>fine (with hard links marginally faster, but harder to introspect)
>- noting that python.org releases will consistently use symlinks for
>easier introspection via "ls -l"
>- updating Makefile.pre.in to ensure that we really do consistently use symlinks

+1, and +1 for the PEP to be accepted.

>This does mean that launching Python may involve a slightly longer
>symlink chain in some cases (python -> python2 -> python2.7), but the
>impact of that is always going to be utterly dwarfed by other startup
>costs.

Agreed about startup times.  However, does the symlink chain have to go in
this order?  Couldn't python -> python2.7 and python2 -> python2.7?  OTOH, I
seriously doubt removing one level of symlink chasing will have any noticeable
effect on startup times.

One other thing I'd like to see the PEP address is a possible migration
strategy to python->python3.  Even if that strategy is "don't do it, man!".
IOW, can a distribution change the 'python' symlink once it's pointed to
python2?  What is the criteria for that?  Is it up to a distribution?  Will
the PEP get updated when our collective wisdom says its time to change the
default?  etc.

Also, if Python 2.7 is being changed to add this feature, why can't Python 3.2
also be changed?  (And if there's a good reason for not doing it there, that
should be added to the PEP.)

Cheers,
-Barry


More information about the Python-Dev mailing list