Guido van Rossum wrote: > On 6/24/06, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >>> Actually, your application *was* pretty close to being broken a few >>> weeks ago, when Guido wanted to drop the requirement that a package >>> must contain an __init__ file. In that case, "import math" would have >>> imported the directory, and given you an empty package. >> But this change was *not* made, and afaict it is not going to be made. > > Correct. We'll stick with the warning. (At least until Py3k but most > likely also in Py3k.)
Perhaps ImportWarning should default to being ignored, the same way PendingDeprecationWarning does? Then -Wd would become 'the one obvious way' to debug import problems, since it would switch ImportWarning on without drowning you in a flood of import diagnostics the way -v can do. Import Errors could even point you in the right direction: >>> import mypackage.foo Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named mypackage.foo Diagnostic import warnings can be enabled with -Wd Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com