From 197d61cc4149cafb1af3dcd6e1ca23818fe52fad 2015-03-25 17:28:47 From: Min RK Date: 2015-03-25 17:28:47 Subject: [PATCH] IPython.terminal.console -> jupyter_console --- diff --git a/IPython/terminal/console.py b/IPython/terminal/console.py new file mode 100644 index 0000000..60a217f --- /dev/null +++ b/IPython/terminal/console.py @@ -0,0 +1,20 @@ +""" +Shim to maintain backwards compatibility with old IPython.terminal.console imports. +""" +# Copyright (c) IPython Development Team. +# Distributed under the terms of the Modified BSD License. + +from __future__ import print_function + +import sys +from warnings import warn + +warn("The `IPython.terminal.console` package has been deprecated. " + "You should import from jupyter_console instead.") + +from IPython.utils.shimmodule import ShimModule + +# Unconditionally insert the shim into sys.modules so that further import calls +# trigger the custom attribute access above + +sys.modules['IPython.terminal.console'] = ShimModule('console', mirror='jupyter_console') diff --git a/IPython/terminal/console/__init__.py b/jupyter_console/__init__.py similarity index 100% rename from IPython/terminal/console/__init__.py rename to jupyter_console/__init__.py diff --git a/IPython/terminal/console/__main__.py b/jupyter_console/__main__.py similarity index 100% rename from IPython/terminal/console/__main__.py rename to jupyter_console/__main__.py diff --git a/IPython/terminal/console/app.py b/jupyter_console/app.py similarity index 100% rename from IPython/terminal/console/app.py rename to jupyter_console/app.py diff --git a/IPython/terminal/console/completer.py b/jupyter_console/completer.py similarity index 100% rename from IPython/terminal/console/completer.py rename to jupyter_console/completer.py diff --git a/IPython/terminal/console/interactiveshell.py b/jupyter_console/interactiveshell.py similarity index 100% rename from IPython/terminal/console/interactiveshell.py rename to jupyter_console/interactiveshell.py diff --git a/IPython/terminal/console/tests/__init__.py b/jupyter_console/tests/__init__.py similarity index 100% rename from IPython/terminal/console/tests/__init__.py rename to jupyter_console/tests/__init__.py diff --git a/IPython/terminal/console/tests/test_console.py b/jupyter_console/tests/test_console.py similarity index 100% rename from IPython/terminal/console/tests/test_console.py rename to jupyter_console/tests/test_console.py diff --git a/IPython/terminal/console/tests/test_image_handler.py b/jupyter_console/tests/test_image_handler.py similarity index 100% rename from IPython/terminal/console/tests/test_image_handler.py rename to jupyter_console/tests/test_image_handler.py diff --git a/IPython/terminal/console/tests/writetofile.py b/jupyter_console/tests/writetofile.py similarity index 100% rename from IPython/terminal/console/tests/writetofile.py rename to jupyter_console/tests/writetofile.py diff --git a/IPython/terminal/console/zmqhistory.py b/jupyter_console/zmqhistory.py similarity index 100% rename from IPython/terminal/console/zmqhistory.py rename to jupyter_console/zmqhistory.py