[NumPy-Tickets] [NumPy] #2228: ABI change in 1.6.1
NumPy Trac
numpy-tickets@scipy....
Tue Oct 30 15:19:56 CDT 2012
#2228: ABI change in 1.6.1
-----------------------------------------+----------------------------------
Reporter: michael.s.gilbert@… | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.core | Version: 1.6.1
Keywords: |
-----------------------------------------+----------------------------------
Comment(by michael.s.gilbert@…):
From the debian bug report:
I found the cause of this bug: in
numpy/core/include/numpy/ndarraytypes.h, in the enum NPY_TYPES, the
value NPY_CHAR has changed between NumPy 1.5 and 1.6 (more precisely, it
was increased by 3, because new types were introduced).
python-scientific uses this enum value at several places (under its
alias PyArray_CHAR). Hence the bug. I verified that replacing
PyArray_CHAR by (PyArray_CHAR+3) in python-scientific and then compiling
against NumPy 1.5 creates a package which is ABI compatible with NumPy
1.6.
This is clearly an ABI breakage in NumPy. I don't see how to fix it
without bumping the ABI number. Since NPY_CHAR must apparently come
after NPY_NTYPES in the enum (the latter counts the number of types), it
seems difficult to patch NumPy 1.6 so that NPY_CHAR keeps the same value
as in 1.5.
What remains unclear to me is whether NPY_CHAR is really meant to be
part of the external API. It looks like the NumPy maintainers are
well-aware of ABI compatibility issues in this very enum (see the
comments in the 1.6 source file), so maybe the change is on purpose. In
that latter case, it is python-scientific which is buggy. That remains
to be clarified.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/2228#comment:2>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list