From f0a0234df558f424bb3d077097c16aa97df2ae82 2012-05-27 09:45:36 From: Thomas Kluyver Date: 2012-05-27 09:45:36 Subject: [PATCH] Ensure modules for autoreload have a __loader__ attribute. --- diff --git a/IPython/extensions/autoreload.py b/IPython/extensions/autoreload.py index 6ca4635..9a9354a 100644 --- a/IPython/extensions/autoreload.py +++ b/IPython/extensions/autoreload.py @@ -372,6 +372,7 @@ def superreload(module, reload=reload, old_objects={}): old_name = module.__name__ module.__dict__.clear() module.__dict__['__name__'] = old_name + module.__dict__['__loader__'] = old_dict['__loader__'] except (TypeError, AttributeError, KeyError): pass