STINNER Victor added the comment:

"Again, I don't think this is a good patch. If you want to disable module 
imports during shutdown, it should be done inside the import machinery, 
not duplicated at every call site."

Ah sorry, I misunderstood your previous comment. I agree that  
traceback_finalize.patch is very specific.

Here is a new patch "import_finalization.patch", which block importing new 
modules (and import again unloaded modules) during finalization.

The full test suite pass with the patch, so at least no unit test tries to 
import a module during finalization.

> (but I don't necessarily agree that it's a good idea, either)

I'm opening a thread on python-dev to discuss this tricky question.

----------
Added file: http://bugs.python.org/file32397/import_finalization.patch

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

Reply via email to