Bug report
It uses two definitions of Py_MOD_GIL_NOT_USED. First one in the slots (as it should be):
|
static PyModuleDef_Slot remote_debugging_slots[] = { |
|
_Py_ABI_SLOT, |
|
{Py_mod_exec, _remote_debugging_exec}, |
|
{Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED}, |
|
{Py_mod_gil, Py_MOD_GIL_NOT_USED}, |
|
{0, NULL}, |
|
}; |
Second one in _remote_debugging_exec:
|
#ifdef Py_GIL_DISABLED |
|
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED); |
|
#endif |
These two ways set the same requires_gil field in the module struct: ((PyModuleObject *)module)->md_requires_gil = requires_gil;, so there's no need to duplicate this. PyUnstable_Module_SetGIL is used for single-phase-initialization modules.
I will send a PR removing the PyUnstable_Module_SetGIL call.
Linked PRs
Bug report
It uses two definitions of
Py_MOD_GIL_NOT_USED. First one in the slots (as it should be):cpython/Modules/_remote_debugging/module.c
Lines 2345 to 2351 in 9a61d1c
Second one in
_remote_debugging_exec:cpython/Modules/_remote_debugging/module.c
Lines 1627 to 1629 in 9a61d1c
These two ways set the same
requires_gilfield in the module struct:((PyModuleObject *)module)->md_requires_gil = requires_gil;, so there's no need to duplicate this.PyUnstable_Module_SetGILis used forsingle-phase-initializationmodules.I will send a PR removing the
PyUnstable_Module_SetGILcall.Linked PRs
PyUnstable_Module_SetGILcall in_remote_debugging#151585PyUnstable_Module_SetGILcall in_remote_debugging(GH-151585) #151603