Backporting Python 2.4 modules

I

Ian Bicking

Wouldn't it be cool if someone took all the enhanced and new modules in
Python 2.3 and 2.4, and backported them to Python 2.2? Maybe all into a
single distutil-installable package called, say, python24? Then you
could do:

from python24 import logging

Lots of the modules have been backported (logging and optparse, for
instance), but there's no central place to find them. And some modules
work fine in older versions, but you wouldn't know.

Since most of the enhancements since Python 2.2 have been in the
standard library, this would be really helpful. Especially for those of
us who want to support older versions of Python, but also want to take
advantage of newer libraries.

Anyway, hopefully someone things this is a good idea as well and maybe
tried to do it? Maybe? Please?
 
D

David Fraser

Ian said:
Wouldn't it be cool if someone took all the enhanced and new modules in
Python 2.3 and 2.4, and backported them to Python 2.2? Maybe all into a
single distutil-installable package called, say, python24? Then you
could do:

from python24 import logging

Lots of the modules have been backported (logging and optparse, for
instance), but there's no central place to find them. And some modules
work fine in older versions, but you wouldn't know.

Since most of the enhancements since Python 2.2 have been in the
standard library, this would be really helpful. Especially for those of
us who want to support older versions of Python, but also want to take
advantage of newer libraries.

Anyway, hopefully someone things this is a good idea as well and maybe
tried to do it? Maybe? Please?
I don't know if anyone has done this but I do think it's a great idea.
I don't think the "from python24 " is neccessary, there could just be a
source code repository of back ports...
I suspect for a lot of modules if the core functionality is rewritten in
Python it'll be easier to backport - I wonder if PyPy will have any
effect in this direction ...

David
 
R

Raymond Hettinger

[Ian Bicking]
Wouldn't it be cool if someone took all the enhanced and new modules in
Python 2.3 and 2.4, and backported them to Python 2.2?

FWIW,
sets.py runs under 2.2,
the itertools docs include code equivalents that run on 2.2,
the ASPN site has a 2.2 version of the new collections.deque object,
the new heapq functions, nsmallest and nlargest, will run on 2.2,
and the new decimal module will run on 2.3.

If you want to package these, that would be nice.

OTOH, upgrading to a more modern python has its advantages too. The newer
Pythons have fewer bugs, better memory usage, better docs, and improved
performance.


Raymond Hettinger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top