On Dec 7, 2009, at 12:11 PM, Dag Sverre Seljebotn wrote:

> Lisandro Dalcin wrote:
>> On Mon, Dec 7, 2009 at 3:29 PM, Robert Bradshaw
>> <[email protected]> wrote:
>>> Is there a way to detect whether the way its been changed is  
>>> backward
>>> compatible?
>>>
>>
>> NumPy exposes an API version number. However, I'm not sure if that
>> would be enough to detect if a change is backwards.
>
> Talking about NumPy-specific solutions, this was improved in 1.4.0  
> with
> several kind of version numbers depending on how things are breaked.
>
> http://docs.scipy.org/doc/numpy/reference/c-api.array.html#checking-the-api-version
>
> So if you call import_array() for NumPy >=1.4.0, NumPy deals with
> checking ABI compatability.
>
> Not sure how that impacts the Cython project though. I guess just
> preparing ourself to answer "please recompile your Cython code towards
> the NumPy version in question" to the coming flood of user questions
> will get us far :-)

So are you thinking of a "check_numpy_abi" function in numpy.pxd that  
users can call (which would check the runtime version against the  
compile time version) if they're worried about binary compatibility?

- Robert

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to