Antoine Pitrou <pit...@free.fr> added the comment: There seem to be two issues at play here:
- the atexit module (and its companion helper _Py_PyAtExit()) doesn't know about sub-interpreters. - PyState_FindModule() doesn't know about sub-interpreters either, because the m_index field (which records the module's index in an interpreter's module list (PyInterpreterState.modules_by_index)) is recorded in the PyModuleDef structure rather than the module instance: it is therefore global to all interpreters Having atexit work properly with sub-interpreters would require fixing these two issues AFAICT. ---------- nosy: +loewis, pitrou versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6531> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com