From 181f693e103e44b0c1f95b6092490de9c92d34e5 2016-10-07 14:43:55 From: Thomas Kluyver Date: 2016-10-07 14:43:55 Subject: [PATCH] Exclude numpy._globals from deepreload Closes gh-9983, though not in a terribly satisfying way. --- diff --git a/IPython/lib/deepreload.py b/IPython/lib/deepreload.py index 9795eac..572ce78 100644 --- a/IPython/lib/deepreload.py +++ b/IPython/lib/deepreload.py @@ -327,7 +327,8 @@ except AttributeError: original_reload = imp.reload # Python 3 # Replacement for reload() -def reload(module, exclude=('sys', 'os.path', builtin_mod_name, '__main__')): +def reload(module, exclude=('sys', 'os.path', builtin_mod_name, '__main__', + 'numpy._globals')): """Recursively reload all modules used in the given module. Optionally takes a list of modules to exclude from reloading. The default exclude list contains sys, __main__, and __builtin__, to prevent, e.g., resetting