[Numpy-discussion] Removing datetime support for 1.4.x series ?

David Cournapeau david at silveregg.co.jp
Wed Feb 3 00:59:56 EST 2010


Travis Oliphant wrote:
> 
> On Feb 2, 2010, at 11:46 PM, David Cournapeau wrote:
> 
>> On Wed, Feb 3, 2010 at 12:23 PM, David Cournapeau 
>> <david at silveregg.co.jp <mailto:david at silveregg.co.jp>> wrote:
>>
>>>
>>> Sorry, my question was badly worded: besides the metadata pointer, is
>>> there any other change related to the metadata infratructure which may
>>> potentially change changes the publicly exported structures ? I wonder
>>> whereas the metadata infrastructure can be kept in 1.4.x independently
>>> of the datetime support without breaking the ABI
>>
>> FWIW, keeping the metadata pointer, and only removing datetime-related
>> things makes numpy 1.4.x backward compatible, at least as far as scipy
>> is concerned. So it seems the PyArray_Funcs change is the only
>> ABI-incompatible change.
> 
> What do you mean by the "PyArray_Funcs change"? 

The change that broke the ABI is in the PyArray_Funcs structure 
(ndarrayobject.h):

struct {
         PyArray_VectorUnaryFunc *cast[NPY_NTYPES];
         ....

Because NPY_NTYPES is bigger after the datetime change.

If there is a way to have the datetime not expanding NPY_NTYPES, then I 
think we can keep the ABI. I tried something with datetimes considered 
as user types, but did not go very far (most certainly because I have 
never used this part of the code before).

David



More information about the NumPy-Discussion mailing list