Michael Forbes <mfor...@users.sourceforge.net> added the comment:
It seems that a reasonable workaround (if you generate your own `spec`) is to call `spec.loader.exec_module(mod)`. This seems to reload the module into the same namespace. (I was afraid that it might replace the namespace hence the desire to use `importlib.reload()` explicitly.) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue21617> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com