From 0f8be07b91f2dbb5a5f3b8cc351b544b550647f9 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 6 Jun 2023 11:19:03 +0200 Subject: [PATCH 1/2] gh-102304: Enhance Simple ABI doc --- Doc/c-api/stable.rst | 8 ++++---- Makefile.pre.in | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Doc/c-api/stable.rst b/Doc/c-api/stable.rst index df01e737bbc4a6..149d4d6bac3ee4 100644 --- a/Doc/c-api/stable.rst +++ b/Doc/c-api/stable.rst @@ -55,6 +55,10 @@ CPython development and spend extra effort adjusting to changes. Stable Application Binary Interface =================================== +For simplicity, this document talks about *extensions*, but the Limited API +and Stable ABI work the same way for all uses of the API – for example, +embedding Python. + .. _limited-c-api: Limited C API @@ -96,10 +100,6 @@ The Stable ABI contains symbols exposed in the :ref:`Limited API `, but also other ones – for example, functions necessary to support older versions of the Limited API. -(For simplicity, this document talks about *extensions*, but the Limited API -and Stable ABI work the same way for all uses of the API – for example, -embedding Python.) - On Windows, extensions that use the Stable ABI should be linked against ``python3.dll`` rather than a version-specific library such as ``python39.dll``. diff --git a/Makefile.pre.in b/Makefile.pre.in index 9cc3164090d704..fa5bcf0e51b94a 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1314,6 +1314,7 @@ regen-limited-abi: all # - Lib/test/test_stable_abi_ctypes.py # - Modules/_testcapi_feature_macros.inc # - PC/python3dll.c + # https://devguide.python.org/developer-workflow/c-api/#adding-a-new-definition-to-the-limited-api $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/stable_abi.py --generate-all $(srcdir)/Misc/stable_abi.toml ############################################################################ From eb4dd7cf6f7e109ff4b89faf6f6a2a3c3aa06e9c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 6 Jun 2023 12:02:17 +0200 Subject: [PATCH 2/2] Remove regen-limited-abi comment So it's no longer needed to maintain it. --- Makefile.pre.in | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in index fa5bcf0e51b94a..ae428ebb9a25f3 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1309,12 +1309,6 @@ check-abidump: all .PHONY: regen-limited-abi regen-limited-abi: all - # Regenerate files using using Tools/build/stable_abi.py: - # - Doc/data/stable_abi.dat - # - Lib/test/test_stable_abi_ctypes.py - # - Modules/_testcapi_feature_macros.inc - # - PC/python3dll.c - # https://devguide.python.org/developer-workflow/c-api/#adding-a-new-definition-to-the-limited-api $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/stable_abi.py --generate-all $(srcdir)/Misc/stable_abi.toml ############################################################################