[arch-dev-public] [RFC] Python 3.3.0 and PEP 394

Stéphane Gaudreault stephane at archlinux.org
Wed Sep 12 20:00:50 EDT 2012


Python 3.3.0 should be released around September 22. I would like to 
take this opportunity to implement some of the recommendations of the 
PEP 394 [1]. This PEP was mostly done in reaction to what Arch did to 
the /usr/bin/python symlink (in summary, most python devs are against 
the move to python3 as a default at this time).

In short:
python2 should refer to some version of Python 2.x
python3 should refer to some version of Python 3.x
python should refer to the same target as python2 but may refer to 
python3 on some bleeding edge distributions

This means that we should never have a reference to '#!/usr/bin/python' 
in any of our packages. All those reference should be changed to 
/usr/bin/python2 to refer to Python 2.x and /usr/bin/python3 for Python 
3.x. The idea here is that a system without any python symlink should 
work without problem. Maybe namcap could be used to detect wrong shebang ?

Another possibility, suggested by Allan, would be to go even further and 
use /usr/bin/python3.3 and /usr/bin/python2.7 for all shebangs. Then 
/usr/bin/python can point to any version and /usr/bin/python2 and 
/usr/bin/python3 can point to any pyhton2.x and python3.x respectively. 
These numbers in the shebangs will be changed when python bump is 
version number as we need to rebuild almost everything anyway.

Any opinions ?

Cheers,

Stéphane

[1] http://www.python.org/dev/peps/pep-0394/


More information about the arch-dev-public mailing list