From 208993aeee4328e1267012d78a0c3b89bf1b0f03 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Sat, 23 Nov 2024 09:21:56 -0700 Subject: [PATCH] BEG, MAINT: Begin NumPy 2.3.0 development. - Create 2.3.0-notes.rst - Update release.rst - Update pavement.py - Update pyproject.toml - Update cversions.txt - Update npy_config.h (define NPY_2_3_API_VERSION) - Delete release fragments. --- .../upcoming_changes/14622.improvement.rst | 4 ---- doc/release/upcoming_changes/26766.change.rst | 2 -- doc/release/upcoming_changes/27088.change.rst | 2 -- .../upcoming_changes/27119.performance.rst | 4 ---- .../upcoming_changes/27147.performance.rst | 8 -------- doc/release/upcoming_changes/27156.change.rst | 9 --------- .../upcoming_changes/27160.expired.rst | 2 -- doc/release/upcoming_changes/27334.change.rst | 9 --------- .../upcoming_changes/27420.new_feature.rst | 2 -- doc/release/upcoming_changes/27482.change.rst | 8 -------- .../upcoming_changes/27636.improvement.rst | 3 --- .../upcoming_changes/27661.compatibility.rst | 5 ----- .../upcoming_changes/27695.improvement.rst | 5 ----- .../upcoming_changes/27723.improvement.rst | 4 ---- .../upcoming_changes/27735.deprecation.rst | 2 -- .../upcoming_changes/27735.new_feature.rst | 4 ---- .../upcoming_changes/27736.new_feature.rst | 3 --- doc/release/upcoming_changes/27807.change.rst | 4 ---- .../upcoming_changes/27808.performance.rst | 2 -- doc/source/release.rst | 1 + doc/source/release/2.3.0-notes.rst | 19 +++++++++++++++++++ numpy/_core/code_generators/cversions.txt | 1 + numpy/_core/include/numpy/numpyconfig.h | 2 ++ pavement.py | 2 +- pyproject.toml | 2 +- 25 files changed, 25 insertions(+), 84 deletions(-) delete mode 100644 doc/release/upcoming_changes/14622.improvement.rst delete mode 100644 doc/release/upcoming_changes/26766.change.rst delete mode 100644 doc/release/upcoming_changes/27088.change.rst delete mode 100644 doc/release/upcoming_changes/27119.performance.rst delete mode 100644 doc/release/upcoming_changes/27147.performance.rst delete mode 100644 doc/release/upcoming_changes/27156.change.rst delete mode 100644 doc/release/upcoming_changes/27160.expired.rst delete mode 100644 doc/release/upcoming_changes/27334.change.rst delete mode 100644 doc/release/upcoming_changes/27420.new_feature.rst delete mode 100644 doc/release/upcoming_changes/27482.change.rst delete mode 100644 doc/release/upcoming_changes/27636.improvement.rst delete mode 100644 doc/release/upcoming_changes/27661.compatibility.rst delete mode 100644 doc/release/upcoming_changes/27695.improvement.rst delete mode 100644 doc/release/upcoming_changes/27723.improvement.rst delete mode 100644 doc/release/upcoming_changes/27735.deprecation.rst delete mode 100644 doc/release/upcoming_changes/27735.new_feature.rst delete mode 100644 doc/release/upcoming_changes/27736.new_feature.rst delete mode 100644 doc/release/upcoming_changes/27807.change.rst delete mode 100644 doc/release/upcoming_changes/27808.performance.rst create mode 100644 doc/source/release/2.3.0-notes.rst diff --git a/doc/release/upcoming_changes/14622.improvement.rst b/doc/release/upcoming_changes/14622.improvement.rst deleted file mode 100644 index 3a3cd01f305d..000000000000 --- a/doc/release/upcoming_changes/14622.improvement.rst +++ /dev/null @@ -1,4 +0,0 @@ -* The ``datetime64`` and ``timedelta64`` hashes now - correctly match the Pythons builtin ``datetime`` and - ``timedelta`` ones. The hashes now evaluated equal - even for equal values with different time units. diff --git a/doc/release/upcoming_changes/26766.change.rst b/doc/release/upcoming_changes/26766.change.rst deleted file mode 100644 index f9223a1d1114..000000000000 --- a/doc/release/upcoming_changes/26766.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -* `numpy.fix` now won't perform casting to a floating data-type for integer - and boolean data-type input arrays. diff --git a/doc/release/upcoming_changes/27088.change.rst b/doc/release/upcoming_changes/27088.change.rst deleted file mode 100644 index c9057ba53ea0..000000000000 --- a/doc/release/upcoming_changes/27088.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Bump the musllinux CI image and wheels to 1_2 from 1_1. This is because 1_1 is -`end of life `_. diff --git a/doc/release/upcoming_changes/27119.performance.rst b/doc/release/upcoming_changes/27119.performance.rst deleted file mode 100644 index abf7b58e4e8a..000000000000 --- a/doc/release/upcoming_changes/27119.performance.rst +++ /dev/null @@ -1,4 +0,0 @@ -* NumPy now uses fast-on-failure attribute lookups for protocols. - This can greatly reduce overheads of function calls or array creation - especially with custom Python objects. The largest improvements - will be seen on Python 3.12 or newer. diff --git a/doc/release/upcoming_changes/27147.performance.rst b/doc/release/upcoming_changes/27147.performance.rst deleted file mode 100644 index f2ec14212ef1..000000000000 --- a/doc/release/upcoming_changes/27147.performance.rst +++ /dev/null @@ -1,8 +0,0 @@ -* OpenBLAS on x86_64 and i686 is built with fewer kernels. Based on - benchmarking, there are 5 clusters of performance around these kernels: - ``PRESCOTT NEHALEM SANDYBRIDGE HASWELL SKYLAKEX``. - -* OpenBLAS on windows is linked without quadmath, simplifying licensing - -* Due to a regression in OpenBLAS on windows, the performance improvements - when using multiple threads for OpenBLAS 0.3.26 were reverted. diff --git a/doc/release/upcoming_changes/27156.change.rst b/doc/release/upcoming_changes/27156.change.rst deleted file mode 100644 index 5902b76d4332..000000000000 --- a/doc/release/upcoming_changes/27156.change.rst +++ /dev/null @@ -1,9 +0,0 @@ -NEP 50 promotion state option removed -------------------------------------- -The NEP 50 promotion state settings are now removed. They were always -meant as temporary means for testing. -A warning will be given if the environment variable is set to anything -but ``NPY_PROMOTION_STATE=weak`` while ``_set_promotion_state`` -and ``_get_promotion_state`` are removed. -In case code used ``_no_nep50_warning``, a ``contextlib.nullcontext`` -could be used to replace it when not available. diff --git a/doc/release/upcoming_changes/27160.expired.rst b/doc/release/upcoming_changes/27160.expired.rst deleted file mode 100644 index 9334aed2bad6..000000000000 --- a/doc/release/upcoming_changes/27160.expired.rst +++ /dev/null @@ -1,2 +0,0 @@ -* ``bool(np.array([]))`` and other empty arrays will now raise an error. - Use ``arr.size > 0`` instead to check whether an array has no elements. diff --git a/doc/release/upcoming_changes/27334.change.rst b/doc/release/upcoming_changes/27334.change.rst deleted file mode 100644 index e8d98ced1776..000000000000 --- a/doc/release/upcoming_changes/27334.change.rst +++ /dev/null @@ -1,9 +0,0 @@ -* The type annotations of ``numpy.float64`` and ``numpy.complex128`` now - reflect that they are also subtypes of the built-in ``float`` and ``complex`` - types, respectively. This update prevents static type-checkers from reporting - errors in cases such as: - - .. code-block:: python - - x: float = numpy.float64(6.28) # valid - z: complex = numpy.complex128(-1j) # valid diff --git a/doc/release/upcoming_changes/27420.new_feature.rst b/doc/release/upcoming_changes/27420.new_feature.rst deleted file mode 100644 index 7f6e223cda62..000000000000 --- a/doc/release/upcoming_changes/27420.new_feature.rst +++ /dev/null @@ -1,2 +0,0 @@ -* ``np.complexfloating[T, T]`` can now also be written as - ``np.complexfloating[T]`` diff --git a/doc/release/upcoming_changes/27482.change.rst b/doc/release/upcoming_changes/27482.change.rst deleted file mode 100644 index 3c974077e0d0..000000000000 --- a/doc/release/upcoming_changes/27482.change.rst +++ /dev/null @@ -1,8 +0,0 @@ -* The ``repr`` of arrays large enough to be summarized (i.e., where elements - are replaced with ``...``) now includes the ``shape`` of the array, similar - to what already was the case for arrays with zero size and non-obvious - shape. With this change, the shape is always given when it cannot be - inferred from the values. Note that while written as ``shape=...``, this - argument cannot actually be passed in to the ``np.array`` constructor. If - you encounter problems, e.g., due to failing doctests, you can use the print - option ``legacy=2.1`` to get the old behaviour. diff --git a/doc/release/upcoming_changes/27636.improvement.rst b/doc/release/upcoming_changes/27636.improvement.rst deleted file mode 100644 index 53c202b31197..000000000000 --- a/doc/release/upcoming_changes/27636.improvement.rst +++ /dev/null @@ -1,3 +0,0 @@ -* Fixed a number of issues around promotion for string ufuncs with StringDType - arguments. Mixing StringDType and the fixed-width DTypes using the string - ufuncs should now generate much more uniform results. diff --git a/doc/release/upcoming_changes/27661.compatibility.rst b/doc/release/upcoming_changes/27661.compatibility.rst deleted file mode 100644 index 0482f876766c..000000000000 --- a/doc/release/upcoming_changes/27661.compatibility.rst +++ /dev/null @@ -1,5 +0,0 @@ -* `numpy.cov` now properly transposes single-row (2d array) design matrices - when ``rowvar=False``. Previously, single-row design matrices would - return a scalar in this scenario, which is not correct, so this - is a behavior change and an array of the appropriate shape will - now be returned. diff --git a/doc/release/upcoming_changes/27695.improvement.rst b/doc/release/upcoming_changes/27695.improvement.rst deleted file mode 100644 index 95584b6e90ce..000000000000 --- a/doc/release/upcoming_changes/27695.improvement.rst +++ /dev/null @@ -1,5 +0,0 @@ -``f2py`` handles multiple modules and exposes variables again -------------------------------------------------------------- -A regression has been fixed which allows F2PY users to expose variables to -Python in modules with only assignments, and also fixes situations where -multiple modules are present within a single source file. diff --git a/doc/release/upcoming_changes/27723.improvement.rst b/doc/release/upcoming_changes/27723.improvement.rst deleted file mode 100644 index bffc9d5a17de..000000000000 --- a/doc/release/upcoming_changes/27723.improvement.rst +++ /dev/null @@ -1,4 +0,0 @@ -* Improved support for empty `memmap`. Previously an empty `memmap` would fail - unless a non-zero ``offset`` was set. Now a zero-size `memmap` is supported - even if ``offset=0``. To achieve this, if a `memmap` is mapped to an empty - file that file is padded with a single byte. diff --git a/doc/release/upcoming_changes/27735.deprecation.rst b/doc/release/upcoming_changes/27735.deprecation.rst deleted file mode 100644 index 897a3871264b..000000000000 --- a/doc/release/upcoming_changes/27735.deprecation.rst +++ /dev/null @@ -1,2 +0,0 @@ -* ``_add_newdoc_ufunc`` is now deprecated. ``ufunc.__doc__ = newdoc`` should - be used instead. diff --git a/doc/release/upcoming_changes/27735.new_feature.rst b/doc/release/upcoming_changes/27735.new_feature.rst deleted file mode 100644 index 4d216218399d..000000000000 --- a/doc/release/upcoming_changes/27735.new_feature.rst +++ /dev/null @@ -1,4 +0,0 @@ -* UFuncs now support ``__dict__`` attribute and allow overriding ``__doc__`` - (either directly or via ``ufunc.__dict__["__doc__"]``). ``__dict__`` can be - used to also override other properties, such as ``__module__`` or - ``__qualname__``. diff --git a/doc/release/upcoming_changes/27736.new_feature.rst b/doc/release/upcoming_changes/27736.new_feature.rst deleted file mode 100644 index 01422db19726..000000000000 --- a/doc/release/upcoming_changes/27736.new_feature.rst +++ /dev/null @@ -1,3 +0,0 @@ -* The "nbit" type parameter of ``np.number`` and its subtypes now defaults - to ``typing.Any``. This way, type-checkers will infer annotations such as - ``x: np.floating`` as ``x: np.floating[Any]``, even in strict mode. diff --git a/doc/release/upcoming_changes/27807.change.rst b/doc/release/upcoming_changes/27807.change.rst deleted file mode 100644 index 995c1770e224..000000000000 --- a/doc/release/upcoming_changes/27807.change.rst +++ /dev/null @@ -1,4 +0,0 @@ -* Calling ``__array_wrap__`` directly on NumPy arrays or scalars - now does the right thing when ``return_scalar`` is passed - (Added in NumPy 2). It is further safe now to call the scalar - ``__array_wrap__`` on a non-scalar result. diff --git a/doc/release/upcoming_changes/27808.performance.rst b/doc/release/upcoming_changes/27808.performance.rst deleted file mode 100644 index e3d5648d3d38..000000000000 --- a/doc/release/upcoming_changes/27808.performance.rst +++ /dev/null @@ -1,2 +0,0 @@ -* NumPy now indicates hugepages also for large ``np.zeros`` allocations - on linux. Thus should generally improve performance. diff --git a/doc/source/release.rst b/doc/source/release.rst index fd0702f4ae17..e9d976473bac 100644 --- a/doc/source/release.rst +++ b/doc/source/release.rst @@ -5,6 +5,7 @@ Release notes .. toctree:: :maxdepth: 2 + 2.3.0 2.2.0 2.1.3 2.1.2 diff --git a/doc/source/release/2.3.0-notes.rst b/doc/source/release/2.3.0-notes.rst new file mode 100644 index 000000000000..74f11a0b4537 --- /dev/null +++ b/doc/source/release/2.3.0-notes.rst @@ -0,0 +1,19 @@ +.. currentmodule:: numpy + +========================== +NumPy 2.3.0 Release Notes +========================== + + +Highlights +========== + +*We'll choose highlights for this release near the end of the release cycle.* + + +.. if release snippets have been incorporated already, uncomment the follow + line (leave the `.. include:: directive) + +.. **Content from release note snippets in doc/release/upcoming_changes:** + +.. include:: notes-towncrier.rst diff --git a/numpy/_core/code_generators/cversions.txt b/numpy/_core/code_generators/cversions.txt index abc5b969c6c7..2024083d0ac9 100644 --- a/numpy/_core/code_generators/cversions.txt +++ b/numpy/_core/code_generators/cversions.txt @@ -77,4 +77,5 @@ 0x00000012 = 2b8f1f4da822491ff030b2b37dff07e3 # Version 19 (NumPy 2.1.0) Only header additions # Version 19 (NumPy 2.2.0) No change +# Version 19 (NumPy 2.3.0) No change 0x00000013 = 2b8f1f4da822491ff030b2b37dff07e3 diff --git a/numpy/_core/include/numpy/numpyconfig.h b/numpy/_core/include/numpy/numpyconfig.h index 46ecade41ada..60e2f91d470d 100644 --- a/numpy/_core/include/numpy/numpyconfig.h +++ b/numpy/_core/include/numpy/numpyconfig.h @@ -82,6 +82,8 @@ #define NPY_1_25_API_VERSION 0x00000011 #define NPY_2_0_API_VERSION 0x00000012 #define NPY_2_1_API_VERSION 0x00000013 +#define NPY_2_2_API_VERSION 0x00000013 +#define NPY_2_3_API_VERSION 0x00000013 /* diff --git a/pavement.py b/pavement.py index e8e63ee89f97..a9bf7febd804 100644 --- a/pavement.py +++ b/pavement.py @@ -36,7 +36,7 @@ #----------------------------------- # Path to the release notes -RELEASE_NOTES = 'doc/source/release/2.2.0-notes.rst' +RELEASE_NOTES = 'doc/source/release/2.3.0-notes.rst' #------------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index 73e2021d9e95..6b8d10a222ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ requires = [ [project] name = "numpy" -version = "2.2.0.dev0" +version = "2.3.0.dev0" # TODO: add `license-files` once PEP 639 is accepted (see meson-python#88) license = {file = "LICENSE.txt"}