On Thu, Mar 03, 2011 at 09:55:25AM +0100, Piotr Ożarowski wrote:
> [Guido van Rossum, 2011-03-02]
> > On Wed, Mar 2, 2011 at 4:56 AM, Piotr Ożarowski <pi...@debian.org> wrote:
> > > [Sandro Tosi, 2011-03-02]
> > >> On Wed, Mar 2, 2011 at 10:01, Piotr Ożarowski <pi...@debian.org> wrote:
> > >> > I co-maintain with Matthias a package that provides /usr/bin/python
> > >> > symlink in Debian and I can confirm that it will always point to Python
> > >> > 2.X. We also do not plan to add /usr/bin/python2 symlink (and I guess
> > >> > only accepted PEP can change that)
> > >>
> > >> Can you please explain why you NACK this proposed change?
> > >
> > > it encourages people to change /usr/bin/python symlink to point to
> > > python3.X which I'm strongly against (how can I tell that upstream
> > > author meant python3.X and not python2.X without checking the code?)
> > 
> > But the same is already true for python2.X vs. python2.Y. Explicit is
> > better than implicit etc. Plus, 5 years from now everybody is going to
> > be annoyed that "python" still refers to some ancient unused version
> > of Python.
> 
> I don't really mind adding /usr/bin/python2 symlink just to clean Arch
> mess, but I do mind changing /usr/bin/python to point to python3 (and I
> can use the same argument - "Explicit is better than implicit" - if you
> need Python 3, say so in the shebang, right?). What I'm afraid of is
> when we'll add /usr/bin/python2, we'll start getting a lot of scripts
> that will have to be checked manually every time new upstream version is
> released because we cannot assume what upstream author is using at given
> point.
> 
> If /usr/bin/python will be disallowed in shebangs on the other hand
> (and all scripts will use /usr/bin/python2, /usr/bin/python3,
> /usr/bin/python4 or /usr/bin/python2.6 etc.) I don't see a problem with
> letting administrators choose /usr/bin/python (right now not only
> changing it from python2.X to python3.X will break the system but also
> changing it from /usr/bin/pytohn2.X to /usr/bin/python2.Y will break it,
> and believe me, I know what I'm talking about (one of the guys at work
> did something like this once))
> 
> [all IMHO, dunno if other Debian's python-defaults maintainers agree
> with me]
>
Thinking outside of the box, I can think of something that would satisfy
your requirements but I don't know how appropriate it is for upstream python
to ship with.  Stop shipping /usr/bin/python.  Ship "python" in an alternate
location like $LIBEXECDIR/python2.7/bin (I think this would be
/usr/lib/python2.7/bin on Debian and /usr/libexec/python2.7/bin on Fedora
which would both be appropriate) then configure which python version is
invoked by the user typing "python" by configuring PATH (a shell alias might
also work).  You could configure this with environment-modules[1]_ if Debian
supports using that in packaging.

Coupled with a PEP that recommends against using /usr/bin/python in scripts
and instead using /usr/bin/python$MAJOR, this might be sufficient.  OTOH, my
cynical side doubts that script authors read PEPs so it'll take either
upstream python shipping without /usr/bin/python or consensus among the
distros to ship without /usr/bin/python to reach the point where script
authors realize that they need to use /usr/bin/python{2,3} instead of
/usr/bin/python.

.. _[1]: http://modules.sourceforge.net/

-Toshio

Attachment: pgp97oSsV2cOw.pgp
Description: PGP signature

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to