Python 2.4 incompatibilities have kind of annoyed me recently, so I am sort of 
resurrecting this thread: 
http://groups.google.com/group/sympy/browse_thread/thread/6fd82f6a77c24f63

How much longer should we support Python 2.4?  That thread was written almost a 
year ago (a year minus one month), and I think it was mentioned that we should 
keep support at least for a year.  I am of the opinion that the 0.7.0 release 
should drop Python 2.4 support.  It will be a point release, with big changes 
anyway.  

The main annoyance is that there were many nice syntactical and standard 
library additions to Python 2.5 that we have to either not use or create work 
arounds for.  Here are some examples.  Everything that I list here I have 
either personally run into as a problem, or have seen other people run into:

- any() and all() built-in functions.  Right now, we have our own versions of 
these functions for use in Python 2.4.

- min(x, y, key=func).  The key argument was not introduced until Python 2.5, 
meaning that finding the minimum of a list with respect to a custom key 
function must be done manually.

- with statements.  These are supported in Python 2.5 with the from __future__ 
import with_statement directive.  These are currently unused (because we 
can't), but they could be very useful with the new assumptions, and probably in 
other places too.  

- finally.  Use of finally blocks with except blocks using try was introduced 
in Python 2.5.

- conditional expressions.  true_value if condition else false_value.  
Currently emulated with the iff() function.

- functools.  There are some useful things here, such as wraps(), which can 
clean up our decorators a bit.  See 
http://groups.google.com/group/sympy/browse_thread/thread/bfc8509a39e1c296/427bbd6c314231a5
 and issue 1843.

- SKIP in doctests.  We have to use >> instead.  

- Python 3 style relative imports.  This was mentioned by Frederick in the 
thread last year as a potential problem for supporting both Python 3 and Python 
2.4.  

- func(1, *args, key=value).  You have to use func(1, *args, **{key:value}).  
This wasn't added until Python 2.6, so we still wouldn't be able to use it, but 
still I wanted to add it here because it annoys me :)  

In addition to these, .txt doctests don't work in Python 2.4.  And speaking of 
tests, when Python 2.7 comes out very soon, we will have to either drop Python 
2.4 or support 4 Python versions, which is additionally complicated by the fact 
that we should be testing all the combinations of the various ground types for 
the new polys, as well as -Qnew, and in 32 and 64 bits.  

So what are people's opinions on this?  If we decide to drop support in sympy 
0.7.0, we can drop support now, since that will be the next version.  

Aaron Meurer

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to