[Python-Dev] 2.7 Release? 2.7 == last of the 2.x line? (original) (raw)

Charles Cazabon charlesc-lists-python-dev at pyropus.ca
Tue Nov 3 19:56:41 CET 2009


"Martin v. Löwis" <martin at v.loewis.de> wrote:

> I wouldn't say that. For instance, I'm just starting a refactoring that will > result in getmail v.5, but I need to target Python 2.5 and up, so there's > essentially no way the code will run in Python 3.x (as another list member > posted).

That's a common myth. It is very well possible, using 2to3. You don't have to wait until you can drop 2.5 to start supporting 3.x, out of a single code base.

I haven't tried this, but I was relying on Daniel Stutzbach's opinion posted here earlier: http://mail.python.org/pipermail/python-dev/2009-November/093608.html

It's pretty easy to make Python source that works under 2.6 and 3.x. It's basically impossible to make Python source that works under 2.4/2.5 and 3.x.

> Why do I need to target Python 2.5? Because that's the most current > default version of Python shipped in Debian stable and various other > distributions that don't stay on the bleeding edge.

Are you saying that it doesn't run on 2.6?

No. getmail v.4 runs fine on Python 2.3.4 through 2.6.x; getmail's code has always been pretty forward-compatible.

Why? (not sure what you mean by "targetting")

By target, I mean backwards compatibility -- the minimum version of Python which is required to run getmail. getmail v.4 came out of beta about five years ago targetting Python 2.3 and higher, and 2.3 was too bleeding-edge for many users -- it wasn't shipped by many Linux distributions for a long time after getmail v.4 was released. Debian still shipps getmail v3 (which supports back to Python 1.5.2) today, although they also ship v4.

getmail v.5 will be released in a month or three. And many of its users will still have Python 2.5, so that's what getmail has to run on. Perhaps Daniel's comment is incorrect (I have no evidence either way), but if it is true that having a single getmail codebase run on Python 2.5 and Python 3.x is "basically impossible", then I won't be too concerned about 3.x for a while yet.

I've been an avid Python user and promoter since 1.2, but saying "drop Python 2.x and switch to 3 now" is simply not realistic in any of the environments in which I use Python daily. My $0.02.

Charles


Charles Cazabon GPL'ed software available at: http://pyropus.ca/software/



More information about the Python-Dev mailing list