On Sep 19, 2014, at 3:31 AM, Bohuslav Kabrda <bkabrda@redhat.com> wrote:

Hi,
as Fedora is getting closer to having python3 as a default, I'm being more and more asked by Fedora users/contributors what'll "/usr/bin/python" invoke when we achieve this (Fedora 22 hopefully). So I was rereading PEP 394 and I think I need a small clarification regarding two points in the PEP:
- "for the time being, all distributions should ensure that python refers to the same target as python2."
- "Similarly, the more general python command should be installed whenever any version of Python is installed and should invoke the same version of Python as either python2 or python3."

The important word in the second point is, I think, *whenever*. Trying to apply these two points to Fedora 22 situation, I can think of several approaches:
- /usr/bin/python will always point to python3 (seems to go against the first mentioned PEP recommendation)
- /usr/bin/python will always point to python2 (seems to go against the second mentioned PEP recommendation, there is no /usr/bin/python if python2 is not installed)
- /usr/bin/python will point to python3 if python2 is not installed, else it will point to python2 (inconsistent; also the user doesn't know he's running and what libraries he'll be able to import - the system can have different sets of python2-* and python3-* extension modules installed)
- there will be no /usr/bin/python (goes against PEP and seems just wrong)

I'd really appreciate upstream guidance and perhaps a PEP clarification for distributions that ship both python2 and python3, but can live without python2 (and are not Arch :)).

Thanks a lot!

I don’t know for a fact, but I assume that as long as Python 2.x is installed by default than ``python`` should point to ``python2``. If Python 3.x is the default version and Python 2.x is the “optional” version than I think personally it makes sense to switch eventually. Maybe not immediately to give people time to update though?

---
Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA