From f3aabe2e20d9c1ba5a34f46a12d7edb00c26b204 2013-07-15 21:31:26 From: Martin Spacek Date: 2013-07-15 21:31:26 Subject: [PATCH] Fix `frontend` deprecation warnings in several examples --- diff --git a/docs/examples/frontend/inprocess_qtconsole.py b/docs/examples/frontend/inprocess_qtconsole.py index eaed539..59b8f3a 100644 --- a/docs/examples/frontend/inprocess_qtconsole.py +++ b/docs/examples/frontend/inprocess_qtconsole.py @@ -6,8 +6,8 @@ kernel, both directly and via the frontend widget. """ from IPython.kernel.inprocess.ipkernel import InProcessKernel -from IPython.frontend.qt.console.rich_ipython_widget import RichIPythonWidget -from IPython.frontend.qt.inprocess_kernelmanager import QtInProcessKernelManager +from IPython.qt.console.rich_ipython_widget import RichIPythonWidget +from IPython.qt.inprocess_kernelmanager import QtInProcessKernelManager from IPython.lib import guisupport diff --git a/examples/core/example-embed-short.py b/examples/core/example-embed-short.py index 09bd449..96b3173 100644 --- a/examples/core/example-embed-short.py +++ b/examples/core/example-embed-short.py @@ -16,7 +16,7 @@ else: exit_msg = '*** Back in main IPython ***' # First import the embed function -from IPython.frontend.terminal.embed import InteractiveShellEmbed +from IPython.terminal.embed import InteractiveShellEmbed # Now create the IPython shell instance. Put ipshell() anywhere in your code # where you want it to open. ipshell = InteractiveShellEmbed(banner1=banner, exit_msg=exit_msg) @@ -36,7 +36,7 @@ from IPython import embed try: get_ipython except NameError: - from IPython.frontend.terminal.embed import InteractiveShellEmbed + from IPython.terminal.embed import InteractiveShellEmbed ipshell = InteractiveShellEmbed() # Now ipshell() will open IPython anywhere in the code else: diff --git a/examples/core/example-embed.py b/examples/core/example-embed.py index 43b4278..fd7bf35 100755 --- a/examples/core/example-embed.py +++ b/examples/core/example-embed.py @@ -35,7 +35,7 @@ else: nested = 1 # First import the embeddable shell class -from IPython.frontend.terminal.embed import InteractiveShellEmbed +from IPython.terminal.embed import InteractiveShellEmbed # Now create an instance of the embeddable shell. The first argument is a # string with options exactly as you would type them if you were starting diff --git a/examples/inprocess/embedded_qtconsole.py b/examples/inprocess/embedded_qtconsole.py index f453b2d..5fe6a1a 100644 --- a/examples/inprocess/embedded_qtconsole.py +++ b/examples/inprocess/embedded_qtconsole.py @@ -1,7 +1,7 @@ import os -from IPython.frontend.qt.console.rich_ipython_widget import RichIPythonWidget -from IPython.frontend.qt.inprocess import QtInProcessKernelManager +from IPython.qt.console.rich_ipython_widget import RichIPythonWidget +from IPython.qt.inprocess import QtInProcessKernelManager from IPython.lib import guisupport diff --git a/examples/inprocess/embedded_terminal.py b/examples/inprocess/embedded_terminal.py index 469f2e1..e42105b 100644 --- a/examples/inprocess/embedded_terminal.py +++ b/examples/inprocess/embedded_terminal.py @@ -1,7 +1,7 @@ import os from IPython.kernel.inprocess import InProcessKernelManager -from IPython.frontend.terminal.console.interactiveshell import ZMQTerminalInteractiveShell +from IPython.terminal.console.interactiveshell import ZMQTerminalInteractiveShell def print_process_id(): diff --git a/examples/tests/embed/embed3.py b/examples/tests/embed/embed3.py index aed8f4d..595ea5d 100644 --- a/examples/tests/embed/embed3.py +++ b/examples/tests/embed/embed3.py @@ -1,6 +1,6 @@ """This tests passing local_ns and global_ns (for backwards compatibility only) at activation of an embedded shell.""" -from IPython.frontend.terminal.embed import InteractiveShellEmbed +from IPython.terminal.embed import InteractiveShellEmbed user_ns = dict(cookie='monster') ISE = InteractiveShellEmbed(banner1='check cookie in locals, and globals empty')