From 980674db5a44d7599a97a9028842884373a93806 2013-01-29 04:23:16 From: MinRK Date: 2013-01-29 04:23:16 Subject: [PATCH] move utils.kernel (formerly entry_point and lib.kernel) to kernel.util --- diff --git a/IPython/frontend/consoleapp.py b/IPython/frontend/consoleapp.py index 70bf832..3163c82 100644 --- a/IPython/frontend/consoleapp.py +++ b/IPython/frontend/consoleapp.py @@ -36,7 +36,7 @@ from IPython.config.configurable import Configurable from IPython.core.profiledir import ProfileDir from IPython.zmq.blockingkernelmanager import BlockingKernelManager from IPython.zmq.kernelmanager import KernelManager -from IPython.utils.kernel import tunnel_to_kernel, find_connection_file, swallow_argv +from IPython.kernel import tunnel_to_kernel, find_connection_file, swallow_argv from IPython.utils.path import filefind from IPython.utils.py3compat import str_to_bytes from IPython.utils.traitlets import ( diff --git a/IPython/frontend/html/notebook/notebookapp.py b/IPython/frontend/html/notebook/notebookapp.py index 26ebba4..0b68a1f 100644 --- a/IPython/frontend/html/notebook/notebookapp.py +++ b/IPython/frontend/html/notebook/notebookapp.py @@ -70,7 +70,7 @@ from IPython.zmq.ipkernel import ( ) from IPython.utils.importstring import import_item from IPython.utils.localinterfaces import LOCALHOST -from IPython.utils.kernel import swallow_argv +from IPython.kernel import swallow_argv from IPython.utils.traitlets import ( Dict, Unicode, Integer, List, Enum, Bool, DottedObjectName diff --git a/IPython/frontend/qt/console/qtconsoleapp.py b/IPython/frontend/qt/console/qtconsoleapp.py index f924383..4dbf106 100644 --- a/IPython/frontend/qt/console/qtconsoleapp.py +++ b/IPython/frontend/qt/console/qtconsoleapp.py @@ -65,7 +65,7 @@ from IPython.frontend.qt.console.rich_ipython_widget import RichIPythonWidget from IPython.frontend.qt.console import styles from IPython.frontend.qt.console.mainwindow import MainWindow from IPython.frontend.qt.kernelmanager import QtKernelManager -from IPython.utils.kernel import tunnel_to_kernel, find_connection_file +from IPython.kernel import tunnel_to_kernel, find_connection_file from IPython.utils.path import filefind from IPython.utils.py3compat import str_to_bytes from IPython.utils.traitlets import ( diff --git a/IPython/kernel/__init__.py b/IPython/kernel/__init__.py index a126c0b..59634ee 100644 --- a/IPython/kernel/__init__.py +++ b/IPython/kernel/__init__.py @@ -1,10 +1,3 @@ -"""IPython.kernel has been replaced by IPython.parallel. +"""IPython kernel bases""" -The previous version of IPython's parallel library was located at this -location (IPython.kernel). It has been moved to the IPython.parallel -subpackage and has been refactored to use zeromq/pyzmq instead of twisted. - -Please see INSERT URL for further details. -""" - -raise ImportError(__doc__) +from .util import * diff --git a/IPython/utils/tests/test_kernel.py b/IPython/kernel/tests/test_util.py similarity index 100% rename from IPython/utils/tests/test_kernel.py rename to IPython/kernel/tests/test_util.py diff --git a/IPython/utils/kernel.py b/IPython/kernel/util.py similarity index 100% rename from IPython/utils/kernel.py rename to IPython/kernel/util.py diff --git a/IPython/lib/kernel.py b/IPython/lib/kernel.py index 050c54c..aee1d55 100644 --- a/IPython/lib/kernel.py +++ b/IPython/lib/kernel.py @@ -1,12 +1,12 @@ """[DEPRECATED] Utilities for connecting to kernels -Moved to IPython.utils.kernel, where it always belonged. +Moved to IPython.kernel.util """ import warnings -warnings.warn("IPython.lib.kernel moved to IPython.utils.kernel in IPython 0.14", +warnings.warn("IPython.lib.kernel moved to IPython.kernel in IPython 0.14", DeprecationWarning ) -from IPython.utils.kernel import * +from IPython.kernel.util import * diff --git a/IPython/zmq/kernelapp.py b/IPython/zmq/kernelapp.py index 07b7a1c..2789540 100644 --- a/IPython/zmq/kernelapp.py +++ b/IPython/zmq/kernelapp.py @@ -40,7 +40,7 @@ from IPython.utils.traitlets import ( DottedObjectName, ) from IPython.utils.importstring import import_item -from IPython.utils.kernel import write_connection_file +from IPython.kernel import write_connection_file # local imports from IPython.zmq.heartbeat import Heartbeat from IPython.zmq.parentpoller import ParentPollerUnix, ParentPollerWindows diff --git a/IPython/zmq/kernelmanager.py b/IPython/zmq/kernelmanager.py index 838af49..e1dfb17 100644 --- a/IPython/zmq/kernelmanager.py +++ b/IPython/zmq/kernelmanager.py @@ -40,7 +40,7 @@ from IPython.utils.traitlets import ( Any, Instance, Type, Unicode, List, Integer, Bool, CaselessStrEnum ) from IPython.utils.py3compat import str_to_bytes -from IPython.utils.kernel import ( +from IPython.kernel import ( write_connection_file, make_ipkernel_cmd, launch_kernel, diff --git a/IPython/zmq/zmqshell.py b/IPython/zmq/zmqshell.py index d12bea3..35ff4d8 100644 --- a/IPython/zmq/zmqshell.py +++ b/IPython/zmq/zmqshell.py @@ -35,7 +35,7 @@ from IPython.core.magics import MacroToEdit, CodeMagics from IPython.core.magic import magics_class, line_magic, Magics from IPython.core.payloadpage import install_payload_page from IPython.inprocess.socket import SocketABC -from IPython.utils.kernel import ( +from IPython.kernel import ( get_connection_file, get_connection_info, connect_qtconsole ) from IPython.testing.skipdoctest import skip_doctest