diff --git a/IPython/ipmaker.py b/IPython/ipmaker.py index b2d896d..1bfbdd9 100644 --- a/IPython/ipmaker.py +++ b/IPython/ipmaker.py @@ -549,12 +549,12 @@ object? -> Details about 'object'. ?object also works, ?? prints more. # Recursive reload try: - from IPython import deep_reload + from IPython.lib import deepreload if IP_rc.deep_reload: - __builtin__.reload = deep_reload.reload + __builtin__.reload = deepreload.reload else: - __builtin__.dreload = deep_reload.reload - del deep_reload + __builtin__.dreload = deepreload.reload + del deepreload except ImportError: pass diff --git a/IPython/deep_reload.py b/IPython/lib/deepreload.py similarity index 96% rename from IPython/deep_reload.py rename to IPython/lib/deepreload.py index c8685ba..f2ea5f7 100644 --- a/IPython/deep_reload.py +++ b/IPython/lib/deepreload.py @@ -2,14 +2,14 @@ """ A module to change reload() so that it acts recursively. To enable it type: - >>> import __builtin__, deep_reload - >>> __builtin__.reload = deep_reload.reload + >>> import __builtin__, deepreload + >>> __builtin__.reload = deepreload.reload You can then disable it with: - >>> __builtin__.reload = deep_reload.original_reload + >>> __builtin__.reload = deepreload.original_reload Alternatively, you can add a dreload builtin alongside normal reload with: - >>> __builtin__.dreload = deep_reload.reload + >>> __builtin__.dreload = deepreload.reload This code is almost entirely based on knee.py from the standard library. """ diff --git a/IPython/lib/tests/test_imports.py b/IPython/lib/tests/test_imports.py index ecff49a..7737076 100644 --- a/IPython/lib/tests/test_imports.py +++ b/IPython/lib/tests/test_imports.py @@ -4,3 +4,6 @@ def test_import_backgroundjobs(): from IPython.lib import backgroundjobs +def test_import_deepreload(): + from IPython.lib import deepreload + diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index a48ba0a..340e1aa 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -199,7 +199,7 @@ def make_runners(): # decorator. See ticket https://bugs.launchpad.net/bugs/366209 top_mod = \ ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'configloader.py', - 'crashhandler.py', 'debugger.py', 'deep_reload.py', 'demo.py', + 'crashhandler.py', 'debugger.py', 'deepreload.py', 'demo.py', 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py', 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', diff --git a/docs/source/development/reorg.txt b/docs/source/development/reorg.txt index 822b6f1..cc2f4f0 100644 --- a/docs/source/development/reorg.txt +++ b/docs/source/development/reorg.txt @@ -82,6 +82,8 @@ Prodecure Need to modify iptests to properly skip modules that are no longer top level modules. +Need to update the top level IPython/__init__.py file. + Where things will be moved ========================== @@ -91,15 +93,18 @@ Where things will be moved * :file:`completer.py`. Move to :file:`IPython/core/completer.py`. - * :file:`ConfigLoader.py`. Move to :file:`IPython/config/configloader.py`. * :file:`CrashHandler.py`. Move to :file:`IPython/core/crashhandler`. -* :file:`DPyGetOpt.py`. Move to :mod:`IPython.sandbox` and replace with newer options parser. - * :file:`Debugger.py`. Move to :file:`IPython/core/debugger.py`. +* :file:`deep_reload.py`. Move to :file:`IPython/lib/deepreload.py`. + + + +* :file:`DPyGetOpt.py`. Move to :mod:`IPython.sandbox` and replace with newer options parser. + * :file:`Extensions`. This needs to be gone through separately. Minimally, the package should be renamed to :file:`extensions`. @@ -140,7 +145,6 @@ Where things will be moved * :file:`config`. Good where it is! -* :file:`deep_reload.py`. Move to :file:`IPython/lib/deepreload.py`. * :file:`demo.py`. Move to :file:`IPython/lib/demo.py`.