Message214697
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:11 | pitrou | set | recipients:
+ pitrou, brett.cannon, martin.panter |
2014-03-24 16:44:11 | pitrou | set | messageid: <1395679451.16.0.897628635315.issue21049@psf.upfronthosting.co.za> |
2014-03-24 16:44:11 | pitrou | link | issue21049 messages |
2014-03-24 16:44:10 | pitrou | create | |
|