3 ms·
This is a good move towards real adoption of Python 3, and doesn't have as dire consequences as it seems. Distros that use Python 3 by default (such as Arch an
by yuvadam 13y ago
This is a good move towards real adoption of Python 3, and doesn't have as dire consequences as it seems.
Distros that use Python 3 by default (such as Arch and Gentoo) still allow for Python 2 to work side-by-side with Python 3. Proper separation using virtualenvs works seamlessly, and there's no problem at all to work simultaneously on Py2 and Py3 projects.
- sentenza 13y agoWhen I read the headline, my first thought was: "Well, _I_ alread switched over some time ago." Then after reading your comment, I remembered that my complete switchover was triggered by the default version switch in my primary machine's distro (Arch). So indeed, these things do matter for real-world adoption of Python 3.
- JulianWasTaken 13y agoThis is untrue about Arch, but true about Gentoo and seemingly will be about Fedora. Your experience with "Py3 default distros" has a bit to do with what version `python` points to. You certainly can get by with virtualenv all over and / or setuptools rewriting shebang lines but it's less convenient. From the two sections in here it appears that Fedora will stick with `python` pointing to Py2, so that's good news.
- viraptor 13y agoWhat's untrue about Arch? /usr/bin/python is python3 by default in there.
- JulianWasTaken 13y agoRight -- on the other two (Gentoo and now Fedora) it's still Python 2 and Python 3 is /usr/bin/python3.
- emhs 13y agoWhat Fedora is planning is leaving /usr/bin/python pointing to Py2, but making all their tools explicitly depend on and request Py3. This is distinctly different from the Arch decision, which instead resulted in fixing everything that expects `python` to mean Py2 to explicitly request Py2, or assisting with the porting process to Py3 for those applications.
- stefantalpalaru 13y agoGentoo lets you choose the python dialect/version with "eselect python". Arch switched to python3 as the default "/usr/bin/python" with no way to change it because of their persistence on following the upstream. They payed the price by having to hunt down and modify all the python2 scripts.
- phaer 13y agoWell, "modify" could mean to just add !#/usr/bin/python2 to the top, right?
- klodolph 13y agoRight, but none of those changes can be merged upstream, because there are too many systems where "python2" does not exist (but some python2.x does). It was a royal PITA for anybody with build scripts written in Python: do you break your scripts for Arch, or do you break them for everybody else?
- sho_hn 13y agoOTOH, it seems to have made Arch packagers above-average aware of the problem space. I ship a reasonably popular Linux desktop application that bundles a Python scripting interface and a set of scripts using it (altogether a minor feature of the application), and when we ported that code to Python 3 in a way that keeps it running on 2.7+ back in 2011, the Arch packager dutifully dropped their patch, making Arch the only distro to run it against Python 3. I'm not used to packagers who actually read release changelogs and/or dutifully drop redundant downstream customizations without explicit reminders, so that impressed me positively :).
- thomasjames 13y agoThe one downside to this in terms of this move increasing adoptions is that RHEL 7 will be based on Fedora 19 not Fedora 20 and subsequent releases. If Python 3 managed to be default on RHEL/CentOS and the like, that would have a much broader impact.