New submission from John Lehmann: Modules that have been loaded as an argument to the command line cannot be reloaded using importlib.reload.
For example with the attached file: $ python reloader.py Traceback (most recent call last): File "reloader.py", line 31, in <module> reload_module("__main__") File "reloader.py", line 28, in reload_module importlib.reload(module) File "/usr/local/var/pyenv/versions/3.5.2/lib/python3.5/importlib/__init__.py", line 166, in reload _bootstrap._exec(spec, module) File "<frozen importlib._bootstrap>", line 607, in _exec AttributeError: 'NoneType' object has no attribute 'name' ---------- components: Library (Lib) files: reloader.py messages: 284910 nosy: j1o1h1n priority: normal severity: normal status: open title: importlib reload fails for module supplied as argument to command line versions: Python 3.5 Added file: http://bugs.python.org/file46191/reloader.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29194> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com