[issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others.

Nick Coghlan report at bugs.python.org
Tue Jul 13 15:14:28 CEST 2010


Nick Coghlan <ncoghlan at gmail.com> added the comment:

Pretty much anything mentioned in PEP 302 is what is being protected.

The one which causes most of the grief is the fact that we need to stick a partially initialised module into sys.modules (so the module can find itself if it needs to), then take it out again if execution of the module level code fails. That means we need to hold the import lock while the module code is executed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8098>
_______________________________________


More information about the Python-bugs-list mailing list