469,643 Members | 2,064 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

Porting from Python 2.3 to 2.4

Hi

Are there any tools that would help in porting code from
Pyton 2.3 to 2.4 ? I have gone through the whatsnew documents
and created a document comparing Python 2.4 to 2.3. But so far
has not been able to find any tool that will signal code in
Python 2.3 that can cause errors in Python 2.4 .

rgds

-Anand

Jul 21 '05 #1
2 1771
Anand wrote:
Hi

Are there any tools that would help in porting code from
Pyton 2.3 to 2.4 ? I have gone through the whatsnew documents
and created a document comparing Python 2.4 to 2.3. But so far
has not been able to find any tool that will signal code in
Python 2.3 that can cause errors in Python 2.4 .

rgds

-Anand

All 2.x versions are backwards compatible. Porting just means taking
advantage of new features. Unless you've been naughty and are accessing
private methods in stdlib, you're probably fine.
Jul 21 '05 #2
Joseph Garvin wrote:
Anand wrote:
Hi

Are there any tools that would help in porting code from
Pyton 2.3 to 2.4 ? I have gone through the whatsnew documents
and created a document comparing Python 2.4 to 2.3. But so far
has not been able to find any tool that will signal code in
Python 2.3 that can cause errors in Python 2.4 .

rgds

-Anand

All 2.x versions are backwards compatible. Porting just means taking
advantage of new features. Unless you've been naughty and are accessing
private methods in stdlib, you're probably fine.


Not strictly speaking true - if your program is taking advantage of some
of the dark corners of the language, there is a chance your program
might not work. Be aware though, that programs that take advantage of
"features" which change between 2.x releases likely aren't using best
practices anyway. (The Python team strongly hesitates to change behavior
if it breaks backward compatibility for a large number of programs.)

See http://www.python.org/doc/2.4.1/what...hatsnew24.html for details
on what changes.

Possible non-backward compatible changes for 2.3->2.4 transition:

*Int/long operations no longer produces FutureWarnings that can be
suppressed. (Uses new behavior instead.)
*Integer operations will no longer trigger an OverflowWarning.
*You can't rebind None.
*New modules/builtin functions added - if you've used the same names,
you may get the wrong module/function in corner cases.

Minor issues all, but if you happen to rely on that behavior, your code
will now fail, sometimes silently.
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by Wolfgang Keller | last post: by
8 posts views Thread by Lucas Raab | last post: by
reply views Thread by Raymond L. Buvel | last post: by
2 posts views Thread by sandip desale | last post: by
19 posts views Thread by Dotan Cohen | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.