Message214697
| 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 |
<1395679451.16.0.897628635315.issue21049@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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" |
|
History
|
|---|
| 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 |
|