[Numpy-discussion] Re: Backporting numpy to Python 2.2
perry at stsci.edu
Tue Apr 25 08:21:02 CDT 2006
On Apr 24, 2006, at 8:38 PM, Travis E. Oliphant wrote:
> Tim Wegener wrote:
>> Hi, I am attempting to backport numpy-0.9.6 to be compatible with
>> python 2.2. (Some of our machines run python 2.2 as part of Red
>> Hat 9 and Red Hat 7.3 and it is hazardous to alter the standard
>> setup.) I was able to change most of the 2.3-isms to be 2.2
>> compatible (see the attached patch). However I had problems
>> compiling the following c module:
> I targeted Python 2.3 because it added some very nice constructs
> (Python 2.4 added even more but I disciplined myself not to use them).
> I think it is not impossible to back-port it to Python 2.2 but I
> agree with Robert that I wonder if it is worth the effort.
> In this case Python 2.3 added the bool type which is used in NumPy.
> Basically this type would have to be constructed (the code could be
> grabbed from Python 2.3) in order to be used.
> The addition of the boolean type is probably the single biggest
> change that would make back-porting to 2.2 difficult.
If I recall correctly, True and False were added in one of the 2.2
patch releases (one of those rare new features added in a patch
release). Only as constant definitions using 0 and 1, and not the
current boolean implementation. So depending on what the current
dependencies on booleans are, it may or may not be usable from 2.2.3.
But I also wonder if it is worth the effort. I tend to think not.
More information about the Numpy-discussion