Brett Cannon <br...@python.org> added the comment:

That's expected because you are constructing a completely new module object 
with importlib.util.module_from_spec(). You're also completely circumventing 
sys.modules with the code you wrote which is the only way you would get 
equivalent IDs compared to using the import statement.

So this is working as intended.

----------
nosy: +brett.cannon
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40427>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to