summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-10-17 23:07:12 (GMT)
committerGitHub <noreply@github.com>2023-10-17 23:07:12 (GMT)
commit73a003f646aea723201f85b858991828f9053d2c (patch)
treec5dbbf4c4dc336df759010c5db911faa79fb1156
parentc58c63fdf615a1c2bfc995dd0b938d82e32b6cde (diff)
downloadcpython-73a003f646aea723201f85b858991828f9053d2c.zip
cpython-73a003f646aea723201f85b858991828f9053d2c.tar.gz
cpython-73a003f646aea723201f85b858991828f9053d2c.tar.bz2
gh-85283: Build _uuid extension with limited C API (#111010)
-rw-r--r--Doc/whatsnew/3.13.rst4
-rw-r--r--Misc/NEWS.d/next/Build/2023-10-17-01-56-11.gh-issue-85283.V156T2.rst4
-rw-r--r--Modules/_uuidmodule.c3
3 files changed, 7 insertions, 4 deletions
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst
index 54f007f..e5f01fa 100644
--- a/Doc/whatsnew/3.13.rst
+++ b/Doc/whatsnew/3.13.rst
@@ -933,8 +933,8 @@ Build Changes
library, GCC built-in atomic functions, or MSVC interlocked intrinsics.
* The ``errno``, ``md5``, ``resource``, ``winsound``, ``_ctypes_test``,
- ``_scproxy``, ``_stat`` and ``_testimportmultiple`` C extensions are now
- built with the :ref:`limited C API <limited-c-api>`.
+ ``_scproxy``, ``_stat``, ``_testimportmultiple`` and ``_uuid`` C extensions
+ are now built with the :ref:`limited C API <limited-c-api>`.
(Contributed by Victor Stinner in :gh:`85283`.)
diff --git a/Misc/NEWS.d/next/Build/2023-10-17-01-56-11.gh-issue-85283.V156T2.rst b/Misc/NEWS.d/next/Build/2023-10-17-01-56-11.gh-issue-85283.V156T2.rst
index cd26f7b..49b5da3 100644
--- a/Misc/NEWS.d/next/Build/2023-10-17-01-56-11.gh-issue-85283.V156T2.rst
+++ b/Misc/NEWS.d/next/Build/2023-10-17-01-56-11.gh-issue-85283.V156T2.rst
@@ -1,4 +1,4 @@
The ``errno``, ``md5``, ``resource``, ``winsound``, ``_ctypes_test``,
-``_scproxy``, ``_stat`` and ``_testimportmultiple`` C extensions are now built
-with the :ref:`limited C API <limited-c-api>`.
+``_scproxy``, ``_stat``, ``_testimportmultiple`` and ``_uuid`` C extensions are
+now built with the :ref:`limited C API <limited-c-api>`.
Patch by Victor Stinner.
diff --git a/Modules/_uuidmodule.c b/Modules/_uuidmodule.c
index 2f5be1c..b35cccb 100644
--- a/Modules/_uuidmodule.c
+++ b/Modules/_uuidmodule.c
@@ -3,6 +3,9 @@
* DCE compatible Universally Unique Identifier library.
*/
+// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
+#define Py_LIMITED_API 0x030d0000
+
#include "Python.h"
#if defined(HAVE_UUID_H)
// AIX, FreeBSD, libuuid with pkgconf