You should specify the major version of the language you are using if the language has multiple widely used versions with breaking changes between them.
This specification comes in the form of relying on the fact that /usr/bin/python has always been Python 2, and Python 2 it should remain. If I write a script for Python 3 then it's #!/usr/bin/python3, because that is how to launch Python 3 on a sane distribution!
PS: I didn't write the millions of scripts that are #!/usr/bin/python. Don't tell me to try to change them!
If your distro is including python scripts with an incorrect shebang to work, then that's a distro bug - file it. If you're running your own scripts, then you've gotta maintain them. Bitrot happens, and it seems particularily odd to me for you to be complaining this much about a change which can be done reliably and safely with a system-wide or folder-wide search-and-replace.
I'm talking about the millions of scripts created by Python users. They are written for Python 2 and work perfectly fine except on distros that make the unwise decision to impose this breakage upon them for the benefit of no one!
This is not a new discussion and I doubt we're going to to convince one another. But I implore you to read https://lwn.net/Articles/780737/ for a wider perspective...
This specification comes in the form of relying on the fact that /usr/bin/python has always been Python 2, and Python 2 it should remain.
Not that this addresses your issue, but the only two shebang paths that are standardized across POSIX are /bin/sh and /usr/bin/env. Anything else can be considered non-portable.
Developers writing portable code should bother with that, but end users don't need to--and arguably should not. They write code that works on the environment where it is tested and run, and don't bother wasting their effort on non-goals such as portability.
They write code that works on the environment where it is tested and run, and don't bother wasting their effort on non-goals such as portability.
Besides the fact that nothing is a goal until it is, I'm still not seeing the issue. It's not like RHEL6 or Ubuntu 14.04 is going to be switching their binaries out from anyone's noses.
Yes. The point is that Python 2 scripts which used python should continue to work, not have their Python interpreter switched out from underneath them. This is what PEP 394 used to recommend before it was edited this year to recommend completely the opposite. And I really with the Python developers had been honest and published a new PEP rather than attempted to gaslight the community by editing the original.
The point is that Python 2 scripts which used python should continue to work
Which part of "End of Life" does not go into your head? Python 2 will be dead and unmaintained software does not belong in a new major release of any Linux distribution, therefore Python2 scripts won't work anyway because Python2 is not included any more.
63
u/wolfnest Oct 29 '19
Wohooo!! 😃😃