diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2012-02-01 18:52:59 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2012-02-04 16:11:40 -0700 |
commit | 8886322d21acec025d668b6431d0070c89b7a90d (patch) | |
tree | d60e31975b92798d6050c7a334caebd5d97480f9 /numpy | |
parent | 8a0e7cd26ea2803b8580dcca1d1306baa1d702dc (diff) | |
download | numpy-8886322d21acec025d668b6431d0070c89b7a90d.tar.gz |
DEP: Deprecate the old_defines.h header and the macros therein.
The old_defines.h file is no longer included in ndarrayobject.h, but
instead in the npy_deprecated_api.h file. It is no longer part of the numpy
build and its deprecation is noted in the release notes.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/include/numpy/ndarrayobject.h | 1 | ||||
-rw-r--r-- | numpy/core/include/numpy/npy_deprecated_api.h | 7 | ||||
-rw-r--r-- | numpy/core/include/numpy/old_defines.h | 5 | ||||
-rw-r--r-- | numpy/core/setup.py | 1 |
4 files changed, 12 insertions, 2 deletions
diff --git a/numpy/core/include/numpy/ndarrayobject.h b/numpy/core/include/numpy/ndarrayobject.h index 03dfcd9cd..74943d535 100644 --- a/numpy/core/include/numpy/ndarrayobject.h +++ b/numpy/core/include/numpy/ndarrayobject.h @@ -214,7 +214,6 @@ PyArray_XDECREF_ERR(PyArrayObject *arr) PyArray_FromDimsAndDataAndDescr(nd, d, PyArray_DescrFromType(type), \ data) -#include "old_defines.h" /* Check to see if this key in the dictionary is the "title" diff --git a/numpy/core/include/numpy/npy_deprecated_api.h b/numpy/core/include/numpy/npy_deprecated_api.h index a268f504a..29bdd95c4 100644 --- a/numpy/core/include/numpy/npy_deprecated_api.h +++ b/numpy/core/include/numpy/npy_deprecated_api.h @@ -95,4 +95,11 @@ */ #define FORTRAN_IF PyArray_FORTRAN_IF +/* + * The macros in old_defines.h are Deprecated as of NumPy 1.7 and will be + * removed in the next major release. + */ +#include "old_defines.h" + + #endif diff --git a/numpy/core/include/numpy/old_defines.h b/numpy/core/include/numpy/old_defines.h index 1607313b7..444fdc33b 100644 --- a/numpy/core/include/numpy/old_defines.h +++ b/numpy/core/include/numpy/old_defines.h @@ -1,3 +1,8 @@ +/* This header is deprecated as of NumPy 1.7 */ +#ifdef NPY_NO_DEPRECATED_API +#error The header "old_defines.h" is deprecated as of NumPy 1.7. +#endif + #define NDARRAY_VERSION NPY_VERSION #define PyArray_MIN_BUFSIZE NPY_MIN_BUFSIZE diff --git a/numpy/core/setup.py b/numpy/core/setup.py index e8f40e806..05872a552 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -733,7 +733,6 @@ def configuration(parent_package='',top_path=None): join('include', 'numpy', 'arrayobject.h'), join('include', 'numpy', '_neighborhood_iterator_imp.h'), join('include', 'numpy', 'npy_endian.h'), - join('include', 'numpy', 'old_defines.h'), join('include', 'numpy', 'arrayscalars.h'), join('include', 'numpy', 'noprefix.h'), join('include', 'numpy', 'npy_interrupt.h'), |