Author mjacob
Recipients brett.cannon, eric.snow, mjacob, ncoghlan
Date 2016-02-16.00:59:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455584341.33.0.058581047341.issue26367@psf.upfronthosting.co.za>
In-reply-to
Content
Python 3.6.0a0 (default:6c6f7dff597b, Feb 16 2016, 01:24:51) 
[GCC 5.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import importlib
>>> importlib.__import__('array', globals(), locals(), level=1)
<module '.array' from '/home/manu/vcs/cpython/build/lib.linux-x86_64-3.6/array.cpython-36m-x86_64-linux-gnu.so'>
>>> __import__('array', globals(), locals(), level=1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: attempted relative import with no known parent package

Instead of failing, importlib.__import__ returns a module with a wrong name.  This happens with both built-in modules and pure python modules.  However it fails when replacing 'array' with 'time' (this seems to be related to whether the module is in Modules/Setup.dist).
History
Date User Action Args
2016-02-16 00:59:01mjacobsetrecipients: + mjacob, brett.cannon, ncoghlan, eric.snow
2016-02-16 00:59:01mjacobsetmessageid: <1455584341.33.0.058581047341.issue26367@psf.upfronthosting.co.za>
2016-02-16 00:59:01mjacoblinkissue26367 messages
2016-02-16 00:59:00mjacobcreate