[Python-Dev] ImportWarning flood

"Martin v. Löwis" martin at v.loewis.de
Wed Jun 28 12:52:45 CEST 2006

Ralf W. Grosse-Kunstleve wrote:
> If there is a consenus, I'd create a new exception ImportErrorNoModule(name)
> that is used consistently from all places. This would ensure uniformity of the
> message in the future.

A correction proposal should only be given if it is likely correct.
There can be many reasons why an import could fail: there might be
no read permission for the file, or the PYTHONPATH might be setup

IOW, a hint about a missing __init__.py should only be given if
a directory with the name of module was found, but lacked an
__init__.py (i.e. in the cases where currently a warning is


More information about the Python-Dev mailing list