Permalink
Browse files

DOC: clarify numpy version for removal, document sed script better.

  • Loading branch information...
charris committed Feb 4, 2012
1 parent cceb8f6 commit bbf49fcad1ac5029ab31235e90235c6161ea41ba
Showing with 12 additions and 2 deletions.
  1. +1 −1 doc/release/2.0.0-notes.rst
  2. +11 −1 tools/replace_old_macros.sed
@@ -185,7 +185,7 @@ similar for PyArray_Descr* and other core objects in the future as
preparation for NumPy 2.0.
The macros in old_defines.h are deprecated and will be removed in the next
-major release. The sed script tools/replace_old_macros.sed can be used to
+minor release (>= 1.8). The sed script tools/replace_old_macros.sed can be used to
replace these macros with the newer versions.
You can test your code against the deprecated C API by #defining
@@ -1,5 +1,15 @@
# Replaces the macros in old_defines.h by current versions
-# Can be run as sed -i -f replace_old_macros.sed <file-paths>
+# Can be run as
+#
+# sed -i -f replace_old_macros.sed <file-paths>
+#
+# or
+#
+# find . -name '*.[c,h]' -exec sed -i -f replace_old_macros.sed {} + ;
+#
+# This script is pretty reliable, but the diff should still
+# be checked after running it to make sure that nothing untoward
+# went down.
s/\bNDARRAY_VERSION\b/NPY_VERSION/g
s/\bPyArray_MIN_BUFSIZE\b/NPY_MIN_BUFSIZE/g
s/\bPyArray_MAX_BUFSIZE\b/NPY_MAX_BUFSIZE/g

0 comments on commit bbf49fc

Please sign in to comment.