New submission from Brett Cannon: importlib.util.module_for_loader (as well as set_package and set_loader) only set those attributes either when they are not already set or when the module is new. I realized this is a problem as it means a reload won't work the way one might expect.
I want to at least change module_for_loader since I suspect that is in wider use, but probably all three decorators to unconditionally set their respective attributes so reloads operate as expected. Unfortunately that is backwards-incompatible, albeit for probably a rare case if anyone actually cares. Anyone see a reason why doing this is a bad idea and it shouldn't be done? ---------- components: Library (Lib) messages: 190139 nosy: barry, brett.cannon, eric.smith, eric.snow, ncoghlan priority: normal severity: normal stage: test needed status: open title: change importlib.util.module_for_loader to unconditionally set attributes type: behavior versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18070> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com