Brett Cannon added the comment:

This is entirely on purpose as you're not meant to call load_module() if you 
want to import code programmatically; that's what importlib.import_module() is 
for. The load_module() method -- which is kind of deprecated thanks to 
exec_module() -- is there purely to initialize the module being imported, with 
everything else the responsibility of other parts of import. You should only be 
calling load_module/execx_module tonload a specific set of bytes and to bypass 
the import machinery entirely, in which case you have to manage any "extras" 
you want, like setting a submodule on a parent package.

----------
resolution:  -> not a bug
status: open -> closed

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

Reply via email to