From 581f6476b6b350dce77c317a4c8e879225151b59 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Fri, 25 Sep 2026 08:31:33 -0600 Subject: [PATCH 1/2] Doc: update abi3t build tool support --- Doc/howto/abi3t-migration.rst | 13 +++++++++---- Doc/whatsnew/3.15.rst | 8 ++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Doc/howto/abi3t-migration.rst b/Doc/howto/abi3t-migration.rst index ec78a33ed25820..88b21df2b77c42 100644 --- a/Doc/howto/abi3t-migration.rst +++ b/Doc/howto/abi3t-migration.rst @@ -169,13 +169,18 @@ or :c:member:`PyTypeObject.tp_itemsize`), it cannot be ported to ``abi3t`` 3.15. +.. _abi3t-migration-build: + Setting up the build ==================== -If you use a build tool (such as setuptools, meson-python, scikit-build-core), -search its documentation for a way to select ``abi3t``. -At the time of writing, not all of them have this; but if your tool does, -use it. +If your build tool supports ``abi3t``, use it to select the ABI. +See the documentation for `meson-python +`__, +`scikit-build-core +`__, +and `Maturin `__, +all of which support ``abi3t``. You may want to verify that it set the right flag by temporarily adding the following just after ``#include ``:: diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index aabc936a24af79..55ce2cf85e640b 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -572,10 +572,10 @@ the existing Stable ABI (``abi3``) and the version-specific ABI for free-threading (``cp315t``) separately. Stable ABI for Free-Threaded Builds should typically -be selected in a build tool (such as, for example, Setuptools, meson-python, -scikit-build-core, or Maturin). -At the time of writing, these tools do **not** support ``abi3t``. -If this is the case for your tool, compile for ``cp315t`` separately. +be selected in a build tool. Tools with ``abi3t`` support include +meson-python, scikit-build-core, and Maturin; see +:ref:`abi3t-migration-build` for links to their documentation on ``abi3t`` builds. +If your build tool does not support ``abi3t``, compile for ``cp315t`` separately. If not using a build tool -- or when writing such a tool -- you can select ``abi3t`` by setting the macro :c:macro:`!Py_TARGET_ABI3T` as discussed in :ref:`abi3-compiling`. From f96f89409feab3ae603c29c1ccd0287114407dfd Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Fri, 25 Sep 2026 13:58:36 -0600 Subject: [PATCH 2/2] Doc: mention free-threaded guide abi3t section --- Doc/howto/abi3t-migration.rst | 7 +++++++ Doc/whatsnew/3.15.rst | 3 +++ 2 files changed, 10 insertions(+) diff --git a/Doc/howto/abi3t-migration.rst b/Doc/howto/abi3t-migration.rst index 88b21df2b77c42..1218fc05ed4fa5 100644 --- a/Doc/howto/abi3t-migration.rst +++ b/Doc/howto/abi3t-migration.rst @@ -190,6 +190,13 @@ following just after ``#include ``:: This should result in a different error than "``abi3t`` define is not set". +.. seealso:: + + `Building and distributing abi3t extensions + `__: + Build configuration and wheel testing examples in the community-maintained + Python Free-Threading Guide. + .. note:: If your build tool doesn't support ``abi3t`` yet, set the following macro diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 55ce2cf85e640b..e0d831ef3e629e 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -582,6 +582,9 @@ in :ref:`abi3-compiling`. A practical :ref:`migration guide ` for switching to ``abi3t`` is available. +The community-maintained `Python Free-Threading Guide +`__ provides examples of building +and testing ``abi3t`` wheels. .. seealso:: :pep:`803` for further details.