Message260338
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). |
|
Date |
User |
Action |
Args |
2016-02-16 00:59:01 | mjacob | set | recipients:
+ mjacob, brett.cannon, ncoghlan, eric.snow |
2016-02-16 00:59:01 | mjacob | set | messageid: <1455584341.33.0.058581047341.issue26367@psf.upfronthosting.co.za> |
2016-02-16 00:59:01 | mjacob | link | issue26367 messages |
2016-02-16 00:59:00 | mjacob | create | |
|