##// END OF EJS Templates
auto-injection of deep-reload removed
Denis S. Tereshchenko -
Show More
@@ -0,0 +1,3 b''
1 The `--deep-reload` flag and the corresponding options to inject `dreload` or
2 `reload` into the interactive namespace have been removed. You have to
3 explicitly import `reload` from `IPython.lib.deepreload` to use it.
@@ -52,17 +52,6 b' class BuiltinTrap(Configurable):'
52 'quit': HideBuiltin,
52 'quit': HideBuiltin,
53 'get_ipython': self.shell.get_ipython,
53 'get_ipython': self.shell.get_ipython,
54 }
54 }
55 # Recursive reload function
56 try:
57 from IPython.lib import deepreload
58 if self.shell.deep_reload:
59 from warnings import warn
60 warn("Automatically replacing builtin `reload` by `deepreload.reload` is deprecated since IPython 4.0, please import `reload` explicitly from `IPython.lib.deepreload", DeprecationWarning)
61 self.auto_builtins['reload'] = deepreload._dreload
62 else:
63 self.auto_builtins['dreload']= deepreload._dreload
64 except ImportError:
65 pass
66
55
67 def __enter__(self):
56 def __enter__(self):
68 if self._nested_level == 0:
57 if self._nested_level == 0:
@@ -260,21 +260,6 b' class InteractiveShell(SingletonConfigurable):'
260 help="Set the color scheme (NoColor, Neutral, Linux, or LightBG)."
260 help="Set the color scheme (NoColor, Neutral, Linux, or LightBG)."
261 ).tag(config=True)
261 ).tag(config=True)
262 debug = Bool(False).tag(config=True)
262 debug = Bool(False).tag(config=True)
263 deep_reload = Bool(False, help=
264 """
265 **Deprecated**
266
267 Will be removed in IPython 6.0
268
269 Enable deep (recursive) reloading by default. IPython can use the
270 deep_reload module which reloads changes in modules recursively (it
271 replaces the reload() function, so you don't need to change anything to
272 use it). `deep_reload` forces a full reload of modules whose code may
273 have changed, which the default reload() function does not. When
274 deep_reload is off, IPython will use the normal reload(), but
275 deep_reload will still be available as dreload().
276 """
277 ).tag(config=True)
278 disable_failing_post_execute = Bool(False,
263 disable_failing_post_execute = Bool(False,
279 help="Don't call post-execute functions that have failed in the past."
264 help="Don't call post-execute functions that have failed in the past."
280 ).tag(config=True)
265 ).tag(config=True)
@@ -341,21 +341,3 b" def reload(module, exclude=('sys', 'os.path', builtin_mod_name, '__main__')):"
341 return deep_reload_hook(module)
341 return deep_reload_hook(module)
342 finally:
342 finally:
343 found_now = {}
343 found_now = {}
344
345
346 def _dreload(module, **kwargs):
347 """
348 **deprecated**
349
350 import reload explicitly from `IPython.lib.deepreload` to use it
351
352 """
353 # this was marked as deprecated and for 5.0 removal, but
354 # IPython.core_builtin_trap have a Deprecation warning for 6.0, so cannot
355 # remove that now.
356 warn("""
357 injecting `dreload` in interactive namespace is deprecated since IPython 4.0.
358 Please import `reload` explicitly from `IPython.lib.deepreload`.
359 """, DeprecationWarning, stacklevel=2)
360 reload(module, **kwargs)
361
General Comments 0
You need to be logged in to leave comments. Login now