This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients brett.cannon, martin.panter, pitrou
Date 2014-03-24.16:44:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Well, basically some sys attributes (including meta_path) are cleaned during shutdown, so if some code executes afterwards and tries to import something, importlib will complain that meta_path is empty.

Unless the warning is genuinely useful, I would suggest simply removing it.

Printing warnings during import can also degenerate into an infinite recursion, if printing the warning needs to import a module, for example:

./python -Wa -c "import sys; sys.meta_path = None; import logging"
Date User Action Args
2014-03-24 16:44:11pitrousetrecipients: + pitrou, brett.cannon, martin.panter
2014-03-24 16:44:11pitrousetmessageid: <>
2014-03-24 16:44:11pitroulinkissue21049 messages
2014-03-24 16:44:10pitroucreate