[Python-Dev] ImportWarning flood (original) (raw)
A.M. Kuchling amk at amk.ca
Thu Jun 22 14:24:01 CEST 2006
- Previous message: [Python-Dev] ImportWarning flood
- Next message: [Python-Dev] Allow assignments in 'global' statements?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Jun 21, 2006 at 10:34:53PM -0700, Ralf W. Grosse-Kunstleve wrote:
But this doesn't: python -W'ignore:Not importing directory:ImportWarning'
This is a bug. I've filed bug #1510580 and assigned it to Brett. I think the problem was exposed by the new-style exception change, but the actual bug is in warnings.py; the check for a legal category is wrong.
Also, the magic incantation to silence the warnings would be very helpful here:
Good idea; I'll add it.
You could add the following to your site.py or your .pythonrc.py:
warnings.filterwarnings('ignore', 'Not importing directory', ImportWarning)
--amk
- Previous message: [Python-Dev] ImportWarning flood
- Next message: [Python-Dev] Allow assignments in 'global' statements?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]