[Scons-users] How important is python 3?

Evan Driscoll driscoll at cs.wisc.edu
Tue Dec 4 15:26:35 EST 2012


[TL;DR version at the end]

I think it won't be too long now until distros will start switching to
Python 3 by default. (By "default" I mostly mean which version does
"python" run, but to a lesser extent also what package you will get if
you say "package-manager install python".) Ubuntu had a goal of only
shipping Python 3 on their installation CDs for the latest release
(12.10); I am not sure if they achieved it or not. They have a goal of
moving Python 2 out of the main repository and into universe for 14.04
(April '14). Arch moved to Python 3 by default in both senses over two
years ago. Once that happens, the bar for using SCons gets raised. Maybe
not by a lot for a bit, but it does go up by a little. (Especially for
people who are using the site-specific version so that theoretically
users don't have to install anything.)

I think a critical point was missed in your original question, which was
whether the suggestion is to move to a code base that works with either
2 or 3 (either by supporting both versions or with six or with 2to3 or
3to2) or a pure Python 3 code base.

Also with regard to what version of Python 2 should be supported, in the
past I've said that it wouldn't surprise me if a far number of people
were using SCons with Python 2.4 because of RHEL 5. Full support
(production phase 1) for RHEL 5 is apparently ending nowish ("Q4 2012"),
so that is probably rapidly becoming less of an issue, if it ever was
one in the first place. RHEL 6 ships with 2.6 by default, so I'm not
sure how much that recommends against requiring 2.7. We use RHEL in my
environment, but we also have lots of Python versions available.


So my votes:

* It's very possible the installation procedure already does this (I
don't have a Python-3-by-default system to test on), but it seems like
soon you'll have to change the shebang line to call "python2" instead of
"python".

* With a mixed code base that supports both Python 2.6/2.7 and Python
3.x, I vote +1.25. I think the Python 3 transition "has to" happen
sometime in the next, I dunno, 2 or 3 years or SCons will really start
to suffer, and it's definitely not premature to make the switch now.

* With a mixed code base that supports Python 2.7 and Python 3.x (but no
2.6), I vote +1. A small amount of extra work for me I think.

* With a Python 3-only code base, I vote -1; with most distros still on
Python 2 by default, *this* does seem quite premature.


Evan


More information about the Scons-users mailing list