Porting to new Python version

2009-02-19 Thread Gabor Urban
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


Re: Porting to new Python version

2009-02-19 Thread Kottiyath
On Feb 19, 5:50 pm, Gabor Urban urbang...@gmail.com 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

It might be helpful if you can provide more information regarding your
application.
For example, does it use lot of 3rd party code, What is the reason
behind porting to latest version etc.
All said, 2.4 to 2.5 or even 2.6 should not be much of an issue - it
even has the advantage that performance is improved and some memory
leaks are no longer there.
Python 3* should be a problem since many 3rd party applications are
not yet ported to it.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Porting to new Python version

2009-02-19 Thread andrew cooke

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




--
http://mail.python.org/mailman/listinfo/python-list


Re: Porting to new Python version

2009-02-19 Thread Steve Holden
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!
 
As long as you don't plan to migrate to 3.0 you may well be surprised at
how easy the port is. Python's backwards compatibility has been pretty
good. Moving to 3.0 will demand more thought and testing.

One might ask what the advantages are supposed to be, of course, but
generally bosses aren't interested in explaining themselves ...

regards
 Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Porting to new Python version

2009-02-19 Thread andrew cooke

maybe i should clarify that easy below is going to be relative.  the
process may end up being very hard due to various other reasons.  what i
was trying to explain is that

(1) 3 is probably going to require a separate branch from 2;

(2) that 2.6 and 3 can both be considered latest;

(3) moving from 2.4 to 2.6 is probably best done before branching for 3;

(4) moving from 2.4 to 2.6 is probably easier than moving from 2 to 3.

andrew


andrew cooke wrote:

 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




 --
 http://mail.python.org/mailman/listinfo/python-list




--
http://mail.python.org/mailman/listinfo/python-list


Re: Porting to new Python version

2009-02-19 Thread Michele Simionato
On Feb 19, 1:50 pm, Gabor Urban urbang...@gmail.com 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

I am a fan of smooth upgrades. Just move to Python 2.5 and you should
have little troubles.
You can wait one year or so for Python 2.6. As a rule of thumb, I
think it is safe to upgrade to a newer Python versions after one year
from its first release, to give time to third party packages. There
are of course exceptions. For instance I remember Zope being far
behind Python releases. I have currently a Zope application running in
Python 2.4 that I cannot upgrade. It all depends from your external
dependencies. If you do not have any, and you do not anticipate the
need for any, you can probably upgrade to Python 2.6 with no effort.

 Michele Simionato
--
http://mail.python.org/mailman/listinfo/python-list