[bind10-dev] Python 2 vs Python 3, was address dependency problems for beta/release
Shane Kerr
shane at isc.org
Wed Nov 28 12:38:42 UTC 2012
Jinmei,
I'm going to reply to these separately, and am starting with Python. :)
On Tuesday, 2012-11-27 09:22:05 -0800,
JINMEI Tatuya / 神明達哉 <jinmei at isc.org> wrote:
> - use python2 instead of python3
The World Today
---
The Python language is in the middle of a transition now. It started
months before the BIND 10 project kicked off, and the transition is
on-going.
What we're seeing is distributions switching to Python 3, for example
Ubuntu will shortly ship Python 3 as the default (or maybe already
did, I don't track Ubuntu closely).
We're also seeing increasing support from libraries (although this
hasn't limited us yet).
With the latest Python 3, the restriction on adding new features has
been lifted, so we're starting to see things like new libraries and the
like.
So, even if we use Python 2, we *also* have to use Python 3. Otherwise
we'll have to do a Python 3 migration project ourselves sometime in the
future.
Possible Support for Both?
---
One possible route is to support *both* Python 2 and Python 3. How
difficult this is depends on which version of Python 2 we target.
I'd like to suggest that we keep Python 3 as our main target, for
reasons above.
If we support Python 2.7, then Python 2 is relatively easy. Python 2.7
has support for the new except syntax, for print() with parenthesis, for
the new bytes literal syntax, and so on.
Python 2.6 seems to support these too.
Python 2.5 does not support byte literal syntax, nor the new except
syntax. So anything from Python 2.5 or earlier would definitely mean
that we would have to include multiple versions or use the 3to2 tool or
something like that.
http://wiki.python.org/moin/3to2
Python 2.6 is "only" 4 years old, so won't be in "enterprise"
distributions, but is everywhere else. Even Debian has 2.6 in the
stable release. :-P
I don't know how much work this would be to do. We'd need:
- Python 2.[67] build machines
- Changes to configure.ac
- Some porting work (for example we use OrderedDict)
I'm guessing it would take something like a week or two for someone to
complete everything. We don't have time for this before the beta.
Is this something we should do before the release? Is it appropriate
after the beta?
--
Shane
More information about the bind10-dev
mailing list