Message246110
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 |
|
Date |
User |
Action |
Args |
2015-07-03 00:41:17 | eric.snow | set | recipients:
+ eric.snow, ncoghlan, grahamd, emptysquare |
2015-07-03 00:41:17 | eric.snow | set | messageid: <1435884077.54.0.517018915499.issue24554@psf.upfronthosting.co.za> |
2015-07-03 00:41:17 | eric.snow | link | issue24554 messages |
2015-07-03 00:41:16 | eric.snow | create | |
|