From d6a3ae0cafdd39c6558c59771089604b230b1276 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Wed, 11 Dec 2024 12:12:19 -0500 Subject: [PATCH 1/3] DOC: Document abi3 compat --- doc/source/dev/depending_on_numpy.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/source/dev/depending_on_numpy.rst b/doc/source/dev/depending_on_numpy.rst index aa970405d2fc..e1bdfb5b268d 100644 --- a/doc/source/dev/depending_on_numpy.rst +++ b/doc/source/dev/depending_on_numpy.rst @@ -33,6 +33,13 @@ forward but not backward compatible. This means: binaries compiled against a given target version of NumPy's C API will still run correctly with newer NumPy versions, but not with older versions. +NumPy can also be safely built in +:ref:`CPython's ``abi3`` mode <`, which allows +extension modules to be built against a single version of Python but be +forward compatible higher versions in the 3.x series. This can greatly reduce +the number of wheels that need to be built and distributed. For more +information and examples, see the +`cibuildwheel docs `__. .. _testing-prereleases: @@ -82,7 +89,7 @@ Build-time dependency If a package either uses the NumPy C API directly or it uses some other tool that depends on it like Cython or Pythran, NumPy is a *build-time* dependency -of the package. +of the package. By default, NumPy will expose an API that is backwards compatible with the oldest NumPy version that supports the currently oldest compatible Python From b3dcccbe711f100e069c2f57b495ba835b924f6e Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Wed, 11 Dec 2024 14:00:35 -0500 Subject: [PATCH 2/3] FIX: 2.0 --- doc/source/dev/depending_on_numpy.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/source/dev/depending_on_numpy.rst b/doc/source/dev/depending_on_numpy.rst index e1bdfb5b268d..40724b395c8f 100644 --- a/doc/source/dev/depending_on_numpy.rst +++ b/doc/source/dev/depending_on_numpy.rst @@ -33,12 +33,12 @@ forward but not backward compatible. This means: binaries compiled against a given target version of NumPy's C API will still run correctly with newer NumPy versions, but not with older versions. -NumPy can also be safely built in -:ref:`CPython's ``abi3`` mode <`, which allows -extension modules to be built against a single version of Python but be -forward compatible higher versions in the 3.x series. This can greatly reduce -the number of wheels that need to be built and distributed. For more -information and examples, see the +Modules can also be safely built against NumPy 2.0 or later in +:ref:`CPython's abi3 mode <`, which allows +building against a single (minimum-supported) version of Python but be +forward compatible higher versions in the same series (e.g., ``3.x``). +This can greatly reduce the number of wheels that need to be built and +distributed. For more information and examples, see the `cibuildwheel docs `__. .. _testing-prereleases: From 340543bf83b171b42c847d342009f8a249852b96 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Wed, 11 Dec 2024 14:19:00 -0500 Subject: [PATCH 3/3] FIX: Link --- doc/source/dev/depending_on_numpy.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/dev/depending_on_numpy.rst b/doc/source/dev/depending_on_numpy.rst index 40724b395c8f..70476a3cc1b3 100644 --- a/doc/source/dev/depending_on_numpy.rst +++ b/doc/source/dev/depending_on_numpy.rst @@ -34,7 +34,7 @@ given target version of NumPy's C API will still run correctly with newer NumPy versions, but not with older versions. Modules can also be safely built against NumPy 2.0 or later in -:ref:`CPython's abi3 mode <`, which allows +:ref:`CPython's abi3 mode `, which allows building against a single (minimum-supported) version of Python but be forward compatible higher versions in the same series (e.g., ``3.x``). This can greatly reduce the number of wheels that need to be built and