[issue21617] importlib reload can fail with AttributeError if module removed from sys.path

Brett Cannon report at bugs.python.org
Sun Jul 15 20:36:57 EDT 2018


Brett Cannon <brett at python.org> added the comment:

If there's no spec, Michael, then your work-around is the next best option (and reloading never actually replaces the actual module object or it's dict/global namespace because we don't know who is holding on to a reference).

----------
nosy: +ncoghlan

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


More information about the Python-bugs-list mailing list