[issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules

Benjamin Mintz report at bugs.python.org
Sun Jul 7 20:54:43 EDT 2019


Benjamin Mintz <benjabean1 at gmail.com> added the comment:

Updated main.py.

New expected output:
====================
True
<module 'testext.sub' (namespace)>
<module 'testext.sub' (namespace)>

New actual output:
==================
False
<module 'testext.sub' (namespace)>
Traceback (most recent call last):
  File "main.py", line 14, in <module>
    print(module.sub)
AttributeError: module 'testext' has no attribute 'sub'

----------
Added file: https://bugs.python.org/file48461/importsfucked.zip

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37521>
_______________________________________


More information about the Python-bugs-list mailing list