[Python-Dev] Support the /usr/bin/python2 symlink upstream (original) (raw)

Allan McRae allan at archlinux.org
Wed Mar 2 15🔞15 CET 2011


On 03/03/11 00:03, Piotr Ożarowski wrote:

[Sandro Tosi, 2011-03-02]

On Wed, Mar 2, 2011 at 13:56, Piotr Ożarowski<piotr at debian.org> wrote:

[Sandro Tosi, 2011-03-02]

On Wed, Mar 2, 2011 at 10:01, Piotr Ożarowski<piotr at 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?) with 'people' do you mean 'users'? if so, isn't this risk already present? users already break their systems via "sudo ezinstall ..." (note the "sudo" part!), I meant developers (distro and upstream authors). If a programmer develops a script in Python 3 on Arch and later ships his file with /usr/bin/python in shebang, it's very likely that this script will not work on all distributions that didn't (yet?) change the symlink. If you, user, change the python symlink (provided by python-minimal in Debian) to something else than what's shipped, it's still a local change, and will never be supported; but with python2 Debian is free to decide if python can be pointed to python3, if the time will come. ... and make other distributions developers' life miserable?

But is that not the whole point of adding the /usr/bin/python2 symlink. That way a developer can explicitly use a /usr/bin/python2 or /usr/bin/python3 shebang and have it portable everywhere. At the moment, Debian seems to be the major hold-up on that actually being a reality being the only major distro I could find that does not provide such a symlink.

Note also that even restricting /usr/bin/python to point at a python-2.x binary gives no guarantee on what actual python-2.x version you are getting, so it is not as if guaranteeing portability is not a problem already...

Allan



More information about the Python-Dev mailing list