[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PEP 394 and shebang lines for /usr/bin/python2 scripts



On Jul 24, 2013, at 01:32 PM, Scott Kitterman wrote:

>Jakub Wilk <jwilk@debian.org> wrote:
>>* Barry Warsaw <barry@debian.org>, 2013-07-24, 12:38:
>>>In any case, it's come up that PEP 394 recommends distros start 
>>>adopting shebang lines that state /usr/bin/python2 in their scripts, 
>>>and I don't think we do this yet.  We should!
>>
>>We absolutely should not.
>
>Definitely not.  The entire notion that /usr/bin/python should point at
>python3 anytime soon is nuts.  Do it when python2.7 is removed from the
>archive, not before. If you aren't going to do that switch, /usr/bin/python2
>is meaningless other than as a workaround for people who care about Arch.
>Since upstream now ships /usr/bin/python2 we should too (and we do for
>Jessie), but there's no good reason for us to be using it.

Can you or Jakub elaborate on *why* you think it's a bad idea?  I can't see
how it hurts.  Setting aside the Python 3 transition, and in light of the
recommendations of PEP 394:

* It doesn't break anything.  As you say, we already ship /usr/bin/python2, so
  everything that works with #!/usr/bin/python will continue to work with
  #!/usr/bin/python2.  You can still override the shebang line with whatever
  executable you want, of course.

* Nobody probably even cares.  How many people care what's in the shebang line
  of scripts?  I bet the fraction of users that have looked at the lines is
  pretty low (it was a while before we finally agreed to stop shipping
  #!/usr/bin/env python).

Note that no one is saying that /usr/bin/python should change to python3 *any
time soon*.  I don't put 2+ years away as any time soon (given that I agree
upstream Python shouldn't even consider changing the recommendation before
Python 2.7 goes into security-only mode in May 2015).

So I guess I'd turn it around and say there's no good reason for us *not* to
do it, but maybe I'm overlooking something.

-Barry


Reply to: