From 2a5c0f898749d933f7e8a704b3502349aff647a1 2013-04-24 04:47:43 From: MinRK Date: 2013-04-24 04:47:43 Subject: [PATCH] update imports with new layout --- diff --git a/IPython/frontend/consoleapp.py b/IPython/frontend/consoleapp.py index c8b3393..58ed6ba 100644 --- a/IPython/frontend/consoleapp.py +++ b/IPython/frontend/consoleapp.py @@ -34,8 +34,8 @@ import uuid from IPython.config.application import boolean_flag from IPython.config.configurable import Configurable from IPython.core.profiledir import ProfileDir -from IPython.kernel.blockingkernelmanager import BlockingKernelManager -from IPython.kernel.kernelmanager import KernelManager +from IPython.kernel.blocking import BlockingKernelManager +from IPython.kernel import KernelManager 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 diff --git a/IPython/kernel/__init__.py b/IPython/kernel/__init__.py index b7b32ff..24b4433 100644 --- a/IPython/kernel/__init__.py +++ b/IPython/kernel/__init__.py @@ -5,6 +5,6 @@ from . import zmq from .connect import * from .launcher import * -from .kernelmanager import KernelManager -from .blockingkernelmanager import BlockingKernelManager +from .manager import KernelManager +from .blocking import BlockingKernelManager from .multikernelmanager import MultiKernelManager diff --git a/IPython/kernel/blocking/__init__.py b/IPython/kernel/blocking/__init__.py index e69de29..4bfa040 100644 --- a/IPython/kernel/blocking/__init__.py +++ b/IPython/kernel/blocking/__init__.py @@ -0,0 +1 @@ +from .manager import BlockingKernelManager \ No newline at end of file diff --git a/IPython/kernel/blocking/manager.py b/IPython/kernel/blocking/manager.py index 3108e70..7663edf 100644 --- a/IPython/kernel/blocking/manager.py +++ b/IPython/kernel/blocking/manager.py @@ -16,7 +16,7 @@ Useful for test suites and blocking terminal interfaces. import Queue from IPython.utils.traitlets import Type -from .kernelmanager import KernelManager, IOPubChannel, HBChannel, \ +from IPython.kernel.manager import KernelManager, IOPubChannel, HBChannel, \ ShellChannel, StdInChannel #----------------------------------------------------------------------------- diff --git a/IPython/kernel/ioloop/__init__.py b/IPython/kernel/ioloop/__init__.py index e69de29..d64f06d 100644 --- a/IPython/kernel/ioloop/__init__.py +++ b/IPython/kernel/ioloop/__init__.py @@ -0,0 +1,2 @@ +from .manager import IOLoopKernelManager +from .restarter import IOLoopKernelRestarter diff --git a/IPython/kernel/ioloop/manager.py b/IPython/kernel/ioloop/manager.py index acfa22d..54f08b9 100644 --- a/IPython/kernel/ioloop/manager.py +++ b/IPython/kernel/ioloop/manager.py @@ -20,8 +20,8 @@ from IPython.utils.traitlets import ( Instance ) -from .blockingkernelmanager import BlockingKernelManager -from .ioloopkernelrestarter import IOLoopKernelRestarter +from IPython.kernel.blocking.manager import BlockingKernelManager +from .restarter import IOLoopKernelRestarter #----------------------------------------------------------------------------- # Code @@ -33,7 +33,7 @@ class IOLoopKernelManager(BlockingKernelManager): def _loop_default(self): return ioloop.IOLoop.instance() - _restarter = Instance('IPython.kernel.ioloopkernelrestarter.IOLoopKernelRestarter') + _restarter = Instance('IPython.kernel.ioloop.IOLoopKernelRestarter') def start_restarter(self): if self.autorestart and self.has_kernel: diff --git a/IPython/kernel/ioloop/restarter.py b/IPython/kernel/ioloop/restarter.py index 4dd90a5..3b9f625 100644 --- a/IPython/kernel/ioloop/restarter.py +++ b/IPython/kernel/ioloop/restarter.py @@ -37,7 +37,7 @@ class IOLoopKernelRestarter(LoggingConfigurable): def _loop_default(self): return ioloop.IOLoop.instance() - kernel_manager = Instance('IPython.kernel.kernelmanager.KernelManager') + kernel_manager = Instance('IPython.kernel.KernelManager') time_to_dead = Float(3.0, config=True, help="""Kernel heartbeat interval in seconds.""" diff --git a/IPython/kernel/manager.py b/IPython/kernel/manager.py index 3c7c881..3d59818 100644 --- a/IPython/kernel/manager.py +++ b/IPython/kernel/manager.py @@ -48,7 +48,7 @@ from IPython.kernel import ( launch_kernel, ) from .zmq.session import Session -from .kernelmanagerabc import ( +from .managerabc import ( ShellChannelABC, IOPubChannelABC, HBChannelABC, StdInChannelABC, KernelManagerABC diff --git a/IPython/kernel/multikernelmanager.py b/IPython/kernel/multikernelmanager.py index be51207..76cb789 100644 --- a/IPython/kernel/multikernelmanager.py +++ b/IPython/kernel/multikernelmanager.py @@ -42,7 +42,7 @@ class MultiKernelManager(LoggingConfigurable): """A class for managing multiple kernels.""" kernel_manager_class = DottedObjectName( - "IPython.kernel.ioloopkernelmanager.IOLoopKernelManager", config=True, + "IPython.kernel.ioloop.IOLoopKernelManager", config=True, help="""The kernel manager class. This is configurable to allow subclassing of the KernelManager for customized behavior. """ diff --git a/IPython/kernel/tests/test_kernelmanager.py b/IPython/kernel/tests/test_kernelmanager.py index b44708a..620a921 100644 --- a/IPython/kernel/tests/test_kernelmanager.py +++ b/IPython/kernel/tests/test_kernelmanager.py @@ -7,7 +7,7 @@ from unittest import TestCase from IPython.testing import decorators as dec from IPython.config.loader import Config -from IPython.kernel.kernelmanager import KernelManager +from IPython.kernel import KernelManager class TestKernelManager(TestCase): diff --git a/IPython/kernel/tests/test_message_spec.py b/IPython/kernel/tests/test_message_spec.py index 71fb1a7..d4ecee7 100644 --- a/IPython/kernel/tests/test_message_spec.py +++ b/IPython/kernel/tests/test_message_spec.py @@ -15,7 +15,7 @@ from Queue import Empty import nose.tools as nt -from ..blockingkernelmanager import BlockingKernelManager +from IPython.kernel.blocking import BlockingKernelManager from IPython.testing import decorators as dec diff --git a/IPython/kernel/tests/test_multikernelmanager.py b/IPython/kernel/tests/test_multikernelmanager.py index 9ff4be1..2f19209 100644 --- a/IPython/kernel/tests/test_multikernelmanager.py +++ b/IPython/kernel/tests/test_multikernelmanager.py @@ -8,7 +8,7 @@ from IPython.testing import decorators as dec from IPython.config.loader import Config from IPython.utils.localinterfaces import LOCALHOST -from IPython.kernel.kernelmanager import KernelManager +from IPython.kernel import KernelManager from IPython.kernel.multikernelmanager import MultiKernelManager class TestKernelManager(TestCase): diff --git a/IPython/kernel/zmq/tests/test_embed_kernel.py b/IPython/kernel/zmq/tests/test_embed_kernel.py index e1cddab..79184b6 100644 --- a/IPython/kernel/zmq/tests/test_embed_kernel.py +++ b/IPython/kernel/zmq/tests/test_embed_kernel.py @@ -22,7 +22,7 @@ from subprocess import Popen, PIPE import nose.tools as nt -from IPython.kernel.blockingkernelmanager import BlockingKernelManager +from IPython.kernel.blocking import BlockingKernelManager from IPython.utils import path, py3compat #-------------------------------------------------------------------------------