]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-117142: Support Importing ctypes in Isolated Interpreters (gh-119991)
authorEric Snow <ericsnowcurrently@gmail.com>
Mon, 3 Jun 2024 22:42:48 +0000 (18:42 -0400)
committerGitHub <noreply@github.com>
Mon, 3 Jun 2024 22:42:48 +0000 (16:42 -0600)
This makes the support official.

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Misc/NEWS.d/next/Library/2024-06-03-11-18-16.gh-issue-117142.kWTXQo.rst [new file with mode: 0644]
Modules/_ctypes/_ctypes.c

diff --git a/Misc/NEWS.d/next/Library/2024-06-03-11-18-16.gh-issue-117142.kWTXQo.rst b/Misc/NEWS.d/next/Library/2024-06-03-11-18-16.gh-issue-117142.kWTXQo.rst
new file mode 100644 (file)
index 0000000..80734ef
--- /dev/null
@@ -0,0 +1,2 @@
+The :mod:`ctypes` module may now be imported in all subinterpreters, including
+those that have their own GIL.
index 6c1e5f58b9565725aa3b4fb03c94eab43b4c4ef3..1d9534671a4ee836790da4f40635b736e4832b2c 100644 (file)
@@ -5939,7 +5939,7 @@ module_free(void *module)
 
 static PyModuleDef_Slot module_slots[] = {
     {Py_mod_exec, _ctypes_mod_exec},
-    {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED},
+    {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
     {Py_mod_gil, Py_MOD_GIL_NOT_USED},
     {0, NULL}
 };