New submission from Eric Snow: Per A. Jesse Jiryu Davis:
=========================== # mod.py class C(object): pass class Pool(object): def __del__(self): print('del') list() C.pool = Pool() =========================== =========================== int main() { Py_Initialize(); PyThreadState *tstate_enter = PyThreadState_Get(); PyThreadState *tstate = Py_NewInterpreter(); PyRun_SimpleString("import mod\n"); if (PyErr_Occurred()) { PyErr_Print(); } Py_EndInterpreter(tstate); PyThreadState_Swap(tstate_enter); printf("about to finalize\n"); Py_Finalize(); printf("done\n"); return 0; } =========================== See: http://emptysqua.re/blog/a-normal-accident-in-python-and-mod-wsgi/ https://github.com/GrahamDumpleton/mod_wsgi/issues/43 ---------- components: Interpreter Core messages: 246110 nosy: emptysquare, eric.snow, grahamd, ncoghlan priority: normal severity: normal stage: test needed status: open title: GC should happen when a subinterpreter is destroyed type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24554> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com