[3.13] gh-117142: Support Importing ctypes in Isolated Interpreters (gh-120008)

This makes the support official.

(cherry picked from commit dba7a167db, AKA gh-119991)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
This commit is contained in:
Miss Islington (bot) 2024-06-04 01:06:56 +02:00 committed by GitHub
parent 39510dadde
commit c348e27cc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1,2 @@
The :mod:`ctypes` module may now be imported in all subinterpreters, including
those that have their own GIL.

View 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}
};