Marcel Plch <gmarcel.p...@gmail.com> added the comment:

> At a guess, the problem is because in atexit_callfuncs():
> 
>    module = PyState_FindModule(&atexitmodule);
>    if (module == NULL)
>        return;

In #31901, I solved this problem by getiing rid of PyState_FindModule in the 
atexit code, using module state and PEP-489 multiphase initialization.

This needed some changes in the pystate and pylifecycle code, so the specific 
interpreter has a reference to its own atexit module. This way, 
Py_EndInterpreter() is able to call the callbacks for the given interpreter.

See: https://github.com/python/cpython/pull/4611

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue6531>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to