[issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path

Brett Cannon report at bugs.python.org
Mon Mar 24 20:35:56 CET 2014


Brett Cannon added the comment:

It's a simple `if not sys.meta_path` check so it doesn't differentiate. But that's actually a good point about it being None in this case due to the shutdown; if the check changed to `if sys.meta_path is not None and len(sys.meta_path) == 0` then that should skip the shutdown issue while keeping the warning around.

Definitely going to be one of those instances where the tests are going to be more troublesome than the fix. =)

----------
keywords: +easy
stage: needs patch -> test needed
versions: +Python 3.5

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


More information about the Python-bugs-list mailing list