summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wiebe <mwwiebe@gmail.com>2012-02-04 16:23:39 -0800
committerCharles Harris <charlesr.harris@gmail.com>2012-04-06 15:54:29 -0600
commit5ede7c7bc2e9342269e708fd183c5311917b9169 (patch)
tree47e7840b539fddad03b0171ef1ac64eb54ae33c1
parent8e8a4ca90319e28d21c6ba32d7249c47ad014025 (diff)
downloadnumpy-5ede7c7bc2e9342269e708fd183c5311917b9169.tar.gz
VER: Bump up NPY_API_VERSION from 6 (Used by 1.6) to 7
Also added NPY_1_7_API_VERSION to numpyconfig.h to help with NPY_NO_DEPRECATED_API macro usage.
-rw-r--r--numpy/core/code_generators/cversions.txt4
-rw-r--r--numpy/core/include/numpy/numpyconfig.h9
-rw-r--r--numpy/core/setup_common.py2
3 files changed, 13 insertions, 2 deletions
diff --git a/numpy/core/code_generators/cversions.txt b/numpy/core/code_generators/cversions.txt
index 64754fa87..3cfd78a99 100644
--- a/numpy/core/code_generators/cversions.txt
+++ b/numpy/core/code_generators/cversions.txt
@@ -6,6 +6,8 @@
# version 4 added neighborhood iterators and PyArray_Correlate2
0x00000004 = 3d8940bf7b0d2a4e25be4338c14c3c85
0x00000005 = 77e2e846db87f25d7cf99f9d812076f0
-# Version 6 added new iterator, half float and casting functions,
+# Version 6 (NumPy 1.6) added new iterator, half float and casting functions,
# PyArray_CountNonzero, PyArray_NewLikeArray and PyArray_MatrixProduct2.
0x00000006 = e61d5dc51fa1c6459328266e215d6987
+# Version 7 (NumPy 1.7) added API for NA, improved datetime64.
+0x00000007 = 00000000000000000000000000000000
diff --git a/numpy/core/include/numpy/numpyconfig.h b/numpy/core/include/numpy/numpyconfig.h
index 19685b3dc..401d19fd7 100644
--- a/numpy/core/include/numpy/numpyconfig.h
+++ b/numpy/core/include/numpy/numpyconfig.h
@@ -21,4 +21,13 @@
#endif
#endif
+/**
+ * To help with the NPY_NO_DEPRECATED_API macro, we include API version
+ * numbers for specific versions of NumPy. To exclude all API that was
+ * deprecated as of 1.7, add the following before #including any NumPy
+ * headers:
+ * #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
+ */
+#define NPY_1_7_API_VERSION 0x00000007
+
#endif
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
index e88be40b0..b30cc4035 100644
--- a/numpy/core/setup_common.py
+++ b/numpy/core/setup_common.py
@@ -29,7 +29,7 @@ C_ABI_VERSION = 0x01000009
# without breaking binary compatibility. In this case, only the C_API_VERSION
# (*not* C_ABI_VERSION) would be increased. Whenever binary compatibility is
# broken, both C_API_VERSION and C_ABI_VERSION should be increased.
-C_API_VERSION = 0x00000006
+C_API_VERSION = 0x00000007
class MismatchCAPIWarning(Warning):
pass