[issue21049] Flood of “ImportWarning: sys.meta_path is empty” after exception with socket subclass

Brett Cannon report at bugs.python.org
Mon Mar 24 16:43:32 CET 2014


Brett Cannon added the comment:

This might be a shutdown issue. If you print out what module is being imported at the time of the warning its 'io' and it's only coming up after the script has exited (you will notice the warnings come up after the traceback is printed). My guess is some cleanup code that gets called a lot is trying to import io after shutdown cleanup has blasted sys.meta_path.

I should also mention that if you raise an exception instead of print the warning nothing shows up, which is another indicator that this is a shutdown-related issue since that could quite easily consume the exception.

Antoine, any ideas on what might be going on?

----------
nosy: +brett.cannon, pitrou

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


More information about the Python-bugs-list mailing list