[Python-porting] Recommended Python version?

R. David Murray rdmurray at bitdance.com
Tue Jun 15 16:53:00 CEST 2010


On Tue, 15 Jun 2010 14:49:38 +0200, "M.-A. Lemburg" <mal at egenix.com> wrote:
> Shane Kerr wrote:
> > Hello,
> > 
> > Apologies if this is not the right list for this question, but there are
> > many Python lists and I wasn't sure which to approach.
> > 
> > We started the BIND 10 project a year ago, and picked Python 3 because
> > we don't expect the software to be production-ready until after 3 years
> > of work.
> > 
> > However, we have concerns because very few systems ship with Python 3
> > "out of the box" still. We think that early adopters - and later all
> > adopters - may be put off by this requirement.

I think that we are right in the middle of this changing.  Python 3.1
just landed in Gentoo stable, for example, and I've heard  that Ubuntu is
planning to ship it in the next version.  Note that Python3 will not
initially ship as the *system* Python, but that Python2 and Python3 will
happily coexist on systems that ship both.

Because Python2 and Python3 can coexist, I would also think that early
adopters would be more willing to install Python3 if their systems don't
already have it, since they are, after all, early adopters :)  By the
time you get to the "all adopters" stage I'm guessing Python3 will
be available on most systems; but that is, of course, a guess.

> > We're considering back-porting the project from 3.1 to 2.7, and then
> > maintaining a version of the software that works with both the older 2.x
> > and the newer 3.x series. Does this make any sense?
> > 
> > Do you have any other recommendations regarding Python 2 vs. Python 3?
> 
> Depending on what you want to do with Python, it's probably best
> to try to write software that works with both Python 2 and 3 -
> especially if you are targeting a very diverse set of systems.

The question, I think, is how much you will be trying to displace BIND 9.
If you want to push BIND 10 out into all the corners currently occupied
by BIND 9, you may need to support systems that won't, in fact, ship
Python3 in the next couple years.  On the other hand, how likely are
such platforms to switch to BIND 10?

Ultimately you are going to have to make the judgement call, since
you know your market and your development resources.  But note that it
is easier to support both Python2 and Python3 than most people think,
and this is especially true if you don't have to worry about backward
compatibility (that is, you only target 2.7), which presumably you don't.

> For backporting from 3 to 2, there's a helper available
> which may be useful: http://www.startcodon.com/wordpress/?cat=8

If you do choose to make it run under Python2, note that the 3to2
project is being actively worked on this summer, and I'm pretty
sure that the maintainer would love feedback from your project.

--
R. David Murray                                      www.bitdance.com


More information about the Python-porting mailing list