As discussed in email thread:
http://www.gossamer-threads.com/lists/python/dev/497487
In particular, there are three specific reasons for not having it. I expect
these reasons to translate to a larger number of specific reasons as
more people use python 2.5.
1) Ralf's software gets a flood of ImportWarnings
2) Twisted's plugin system uses a directory named "twisted" without an
__init__.py in it on the python path to store plugins in. Therefore,
anybody running (importing) twisted will produce annoying warnings.
3) I have a directory in my homedir called "readline".
Quoted from my email:
I just found another reason to dislike the warnings: my homedir on
one machine has a lot of random directories in it. One of them is
named "readline". Every time I run python 2.5, it now helpfully notes:
sys:1: ImportWarning: Not importing directory 'readline': missing
__init__.py
It used to be the case that it was very unlikely that running python
in your homedir would cause issues. Even though the current directory
is on the default pythonpath, you needed to have either a file ending
in .py or a directory with an __init__.py with the same name as a
python module to cause problems. And that is generally unlikely to
happen. Now, however, you get warnings just by having _any_ directory
in your CWD with the same name as a python module. That's much
more
likely to happen; I can't be the only one who will have this issue.
Suggested solution: Remove ImportWarning, and make the ImportError
message say:
>> ImportError: No module named mypackage.foo
>> Note that subdirectories are searched for imports only if they
contain an
>> __init__.py file: http://www.python.org/doc/essays/packages.html
I really think this should be addressed before 2.5 is released.
|