Pavel Kostyuchenko <shpr...@gmail.com> added the comment:
Also it might be viable to add some assertion to verify the take_gil is not called with uninitialized interpreter. I used the changes in the attachment (take_gil.assert.patch), but it produced errors during test_tracemalloc with f13c5c8b9401a9dc19e95d8b420ee100ac022208 . It happens because, during startup with invalid arguments, the interpreter is finalized with pymain_main->pymain_free->_PyRuntime_Finalize before the error is printed. However, the problem seems to be fixed for me in the last revisions of master branch, so I upload the diff against it. ---------- Added file: https://bugs.python.org/file48334/take_gil.assert.patch _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33608> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com