This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dgreiman
Recipients brett.cannon, dgreiman, eric.smith, orsenthil, ztane
Date 2016-12-10.00:16:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1481329004.9.0.577086346007.issue28425@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-12-10 00:16:44dgreimansetrecipients: + dgreiman, brett.cannon, orsenthil, eric.smith, ztane
2016-12-10 00:16:44dgreimansetmessageid: <1481329004.9.0.577086346007.issue28425@psf.upfronthosting.co.za>
2016-12-10 00:16:44dgreimanlinkissue28425 messages
2016-12-10 00:16:44dgreimancreate