From 4de754aa096fee82c4db3e03a8b340c1f8cfbfb5 2017-05-09 21:26:12 From: Luke Pfister Date: 2017-05-09 21:26:12 Subject: [PATCH] Don't reload __mp_main__ Fixes #10522 --- diff --git a/IPython/extensions/autoreload.py b/IPython/extensions/autoreload.py index 2fe9974..207d03a 100644 --- a/IPython/extensions/autoreload.py +++ b/IPython/extensions/autoreload.py @@ -185,8 +185,8 @@ class ModuleReloader(object): if not hasattr(module, '__file__') or module.__file__ is None: return None, None - if getattr(module, '__name__', None) == '__main__': - # we cannot reload(__main__) + if getattr(module, '__name__', None) in ['__mp_main__', '__main__']: + # we cannot reload(__main__) or reload(__mp_main__) return None, None filename = module.__file__