[Python-Dev] ImportWarning flood

Nick Coghlan ncoghlan at gmail.com
Sat Jul 1 10:01:29 CEST 2006


Guido van Rossum wrote:
> It's up to the release manager now to decide whether the pitchforks at
> Google or the pitchforks in the larger Python community are sharper.
> ;-)
> 
> --Guido (ducks)

I vaguely recall one of the reasons we went with the warning approach was to 
find out whether or not dropping __init__.py would cause serious problems - I 
think we have our answer to that question now :)

How does this sound for a way forward?:

2.5b2:
  - ignore ImportWarning by default (like PendingDeprecationWarning)
  - include in What's New instructions to enable it via the command line or 
Python code

2.6:
  - only show ImportWarning if the import ultimately fails
  - enable ImporWarning by default
  - consider allowing a .py extension on a directory name as an alternative to 
an __init__.py file.

Google could then change their sitecustomize.py to enable the warning by 
default when they roll out 2.5 :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-Dev mailing list