Porting to new Python version

andrew cooke andrew at acooke.org
Thu Feb 19 08:12:36 EST 2009


i don't know what the context is, so it's hard for me to comment on the
decision (i assume there are commerical pressures like customers not
wanting to install old versions).

however,if you go ahead, you need to think about exactly what you want to
target.

the latest version is really 3.0.1.  moving to 3 is probably not that hard
(and there are tools to automate the process).  also, 2.6 is largely
compatible with 3.  so moving to something that works with 2.6 and 3 is
probably a reasonable target.  but that code will not work, without more
significant effort, on 2.5 and earlier.

so one idea would be to keep your existing code for 2.4, and update for 3.
 for some time (years) you will need to support two versions, but if it is
stable then that may not be much work.

alternatively, you could ignore 3, which is not going to be mainstream for
some time, and simply run against 2.6 and 2.5.  that should be even less
work because you're staying with 2.  you could then say that your code
works on 2.4 through 2.6

or, finally, you could do the second step above (to get code that works on
2.4 to 2.6) and then the first step (to get a separate version that works
on 3).  doing things in that order (with staged releases) lets you get
most bug fixes for 2.5/6 into the code before branching for 3.

hope that makes sense.

disclaimer - i have not done the above; this is from reading various
newsgroups and attempting to backport a project written in 3 to 2 (it was
easy to go to 2.6, but i failed to get the same code to run on 2.5).

andrew





Gabor Urban wrote:
> Hi,
>
> I have a tough issue: we are using a Python application written quite
> a time ago for version 2.4. The code is mature, and there are no bugs.
>  My bosses came up with the idea to port it to the latest release... I
> am not really convinced that it's a good step.
>
> I wellcome any information pro and contra. I would like to get the
> background as precisely as possible.
>
> Thanks in advance and good day to You!
>
> Gabor
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>





More information about the Python-list mailing list