[issue28425] Python3 ignores __init__.py that are links to /dev/null
Douglas Greiman
report at bugs.python.org
Fri Dec 9 19:16:44 EST 2016
Douglas Greiman added the comment:
To be thorough, I looked at non __init__.py source files as well, with erratic results. And who knows what would happen on other OS's. So a blanket "must be a regular file" seems reasonable.
$ ls -l b.*
lrwxrwxrwx 1 dgreiman eng 9 Dec 9 16:05 b.py -> /dev/null
$ python2.7 -m b # Success
$ python2.7 -c 'import b' # Success
$ python2.7 b.py # Success
$ python3.5 b.py # Success
$ python3.5 -m b # Failure
/opt/python3.5/bin/python3.5: No module named b
$ python3.5 -c 'import b' # Failure
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'b'
$ uname -a
Linux 53334eb940e6 3.13.0-101-generic #148-Ubuntu SMP Thu Oct 20 22:08:32 UTC 2016 x86_64 GNU/Linux
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28425>
_______________________________________
More information about the Python-bugs-list
mailing list