From 271f7ce66aa57ef506d61e2a3b3b3666b2df6d54 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Mon, 3 Jun 2024 11:17:00 -0600 Subject: [PATCH 1/3] Declare support for per-interpreter GIL. --- Modules/_ctypes/_ctypes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 6c1e5f58b95657..1d9534671a4ee8 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -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} }; From e4310f2dd3e1d0fbe059c4f58ec184a9932ebfc2 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Mon, 3 Jun 2024 11:18:23 -0600 Subject: [PATCH 2/3] Add a NEWS entry. --- .../next/Library/2024-06-03-11-18-16.gh-issue-117142.kWTXQo.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2024-06-03-11-18-16.gh-issue-117142.kWTXQo.rst 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 index 00000000000000..71ad3d55a6c071 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-06-03-11-18-16.gh-issue-117142.kWTXQo.rst @@ -0,0 +1,2 @@ +The ``ctypes`` module may now be imported in all subinterpreters, including +those that have their own GIL. From b7f7ced18251a316b48c6cd4b1e0698a03a9ac41 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Mon, 3 Jun 2024 15:37:21 -0600 Subject: [PATCH 3/3] Update Misc/NEWS.d/next/Library/2024-06-03-11-18-16.gh-issue-117142.kWTXQo.rst Co-authored-by: Kirill Podoprigora --- .../next/Library/2024-06-03-11-18-16.gh-issue-117142.kWTXQo.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 71ad3d55a6c071..80734ef3946300 100644 --- 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 @@ -1,2 +1,2 @@ -The ``ctypes`` module may now be imported in all subinterpreters, including +The :mod:`ctypes` module may now be imported in all subinterpreters, including those that have their own GIL.