diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 54f007f7d12551..e5f01fa2df35dd 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 `. + ``_scproxy``, ``_stat``, ``_testimportmultiple`` and ``_uuid`` C extensions + are now built with the :ref:`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 cd26f7be288399..49b5da32f8f72e 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 `. +``_scproxy``, ``_stat``, ``_testimportmultiple`` and ``_uuid`` C extensions are +now built with the :ref:`limited C API `. Patch by Victor Stinner. diff --git a/Modules/_uuidmodule.c b/Modules/_uuidmodule.c index 2f5be1c5144d83..b35cccb5bdc406 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