[New-bugs-announce] [issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path

Brett Cannon report at bugs.python.org
Mon Mar 24 18:20:08 CET 2014


New submission from Brett Cannon:

Issue #21049 managed to trigger a huge output of "ImportWarning: sys.meta_path is empty" because it managed to trigger an import during interpreter shutdown. The ImportWarning for sys.path_hooks and sys.meta_path were originally added because before importlib took over import it was totally legal to blank out sys.path_hooks and sys.meta_path and have import continue to work. But hopefully by the time Python 3.5 comes out there will be enough knowledge out there to not blindly empty them, making the warning superfluous as well as an annoyance when things go wrong in other respects.

----------
components: Interpreter Core
messages: 214702
nosy: brett.cannon, eric.snow, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path
type: behavior

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


More information about the New-bugs-announce mailing list