On Tuesday, April 14, 2015 08:24:01 AM Thomas Kluyver wrote: > On 14 April 2015 at 08:10, Barry Warsaw <ba...@python.org> wrote: > > But it fails unhelpfully when you use it in a shebang. > > > > $ /tmp/foo.py > > bash: /tmp/foo.py: /usr/bin/python: bad interpreter: No such file or > > directory > > > > Let's make the latter more helpful. > > > From a script authors point of view, it's currently safe to assume that a > shebang like '#!/usr/bin/env python' will work on any Linux machine. In > some cases (Arch) it may already refer to Python 3, but with some care it's > entirely possible to write a script that can do the right thing on Python 2 > or 3. If distros start to remove 'python', there's an interim period before > it's safe to assume that 'python3' is available everywhere, and script > authors currently don't have any good options to bridge that. > > I know Debian is all in on treating Python 2 and 3 as two entirely separate > worlds, but that's not how everyone sees them. It would be nice to make > some kind of affordance to people for whom they are two versions of the > same language.
My concern regarding the future of /usr/bin/python isn't for things that are being updated, but for things that aren't. Anything written for python3 already uses /usr/bin/python3, so there's no forward compatibility issue. I have scripts I use locally that are untouched in almost a decade that use /usr/bin/python. They work and require no maintenance. I've not ported them to python3, because there's no need. It would seriously break my expectations as an admin if at some point I upgraded to a new version of Debian and /usr/bin/python magically switched to python3 and all my stuff broke. It's at least half a decade too soon to even think about this (I know Arch went insane, but that's their problem IMO). Scott K -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/9342632.b15tYHvqKN@kitterma-e6430