##// END OF EJS Templates
move IPython.inprocess to IPython.kernel.inprocess
MinRK -
Show More
@@ -81,5 +81,5 b' def embed_kernel(module=None, local_ns=None, **kwargs):'
81 81 local_ns = caller_locals
82 82
83 83 # Only import .zmq when we really need it
84 from .zmq.embed import embed_kernel as real_embed_kernel
84 from IPython.kernel.zmq.embed import embed_kernel as real_embed_kernel
85 85 real_embed_kernel(module=module, local_ns=local_ns, **kwargs)
@@ -2,7 +2,7 b''
2 2 """
3 3
4 4 # Local imports.
5 from IPython.inprocess.kernelmanager import \
5 from IPython.kernel.inprocess.kernelmanager import \
6 6 InProcessShellChannel, InProcessIOPubChannel, InProcessStdInChannel, \
7 7 InProcessHBChannel, InProcessKernelManager
8 8 from IPython.utils.traitlets import Type
1 NO CONTENT: file renamed from IPython/inprocess/__init__.py to IPython/kernel/inprocess/__init__.py
1 NO CONTENT: file renamed from IPython/inprocess/blockingkernelmanager.py to IPython/kernel/inprocess/blockingkernelmanager.py
@@ -1,4 +1,4 b''
1 """ An in-process kernel. """
1 """An in-process kernel"""
2 2
3 3 #-----------------------------------------------------------------------------
4 4 # Copyright (C) 2012 The IPython Development Team
@@ -16,14 +16,15 b' from contextlib import contextmanager'
16 16 import logging
17 17 import sys
18 18
19 # Local imports.
19 # Local imports
20 20 from IPython.core.interactiveshell import InteractiveShellABC
21 from IPython.inprocess.socket import DummySocket
22 21 from IPython.utils.jsonutil import json_clean
23 22 from IPython.utils.traitlets import Any, Enum, Instance, List, Type
24 23 from IPython.kernel.zmq.ipkernel import Kernel
25 24 from IPython.kernel.zmq.zmqshell import ZMQInteractiveShell
26 25
26 from .socket import DummySocket
27
27 28 #-----------------------------------------------------------------------------
28 29 # Main kernel class
29 30 #-----------------------------------------------------------------------------
@@ -36,7 +37,7 b' class InProcessKernel(Kernel):'
36 37
37 38 # The frontends connected to this kernel.
38 39 frontends = List(
39 Instance('IPython.inprocess.kernelmanager.InProcessKernelManager'))
40 Instance('IPython.kernel.inprocess.kernelmanager.InProcessKernelManager'))
40 41
41 42 # The GUI environment that the kernel is running under. This need not be
42 43 # specified for the normal operation for the kernel, but is required for
@@ -151,7 +152,7 b' class InProcessKernel(Kernel):'
151 152
152 153 class InProcessInteractiveShell(ZMQInteractiveShell):
153 154
154 kernel = Instance('IPython.inprocess.ipkernel.InProcessKernel')
155 kernel = Instance('IPython.kernel.inprocess.ipkernel.InProcessKernel')
155 156
156 157 #-------------------------------------------------------------------------
157 158 # InteractiveShell interface
@@ -13,7 +13,6 b''
13 13
14 14 # Local imports.
15 15 from IPython.config.configurable import Configurable
16 from IPython.inprocess.socket import DummySocket
17 16 from IPython.utils.traitlets import Any, Instance, Type
18 17 from IPython.kernel import (
19 18 ShellChannelABC, IOPubChannelABC,
@@ -21,6 +20,8 b' from IPython.kernel import ('
21 20 KernelManagerABC
22 21 )
23 22
23 from .socket import DummySocket
24
24 25 #-----------------------------------------------------------------------------
25 26 # Channel classes
26 27 #-----------------------------------------------------------------------------
@@ -197,7 +198,7 b' class InProcessKernelManager(Configurable):'
197 198 return Session(config=self.config)
198 199
199 200 # The kernel process with which the KernelManager is communicating.
200 kernel = Instance('IPython.inprocess.ipkernel.InProcessKernel')
201 kernel = Instance('IPython.kernel.inprocess.ipkernel.InProcessKernel')
201 202
202 203 # The classes to use for the various channels.
203 204 shell_channel_class = Type(InProcessShellChannel)
@@ -272,7 +273,7 b' class InProcessKernelManager(Configurable):'
272 273 #--------------------------------------------------------------------------
273 274
274 275 def start_kernel(self, **kwds):
275 from IPython.inprocess.ipkernel import InProcessKernel
276 from IPython.kernel.inprocess.ipkernel import InProcessKernel
276 277 self.kernel = InProcessKernel()
277 278 self.kernel.frontends.append(self)
278 279
1 NO CONTENT: file renamed from IPython/inprocess/socket.py to IPython/kernel/inprocess/socket.py
1 NO CONTENT: file renamed from IPython/inprocess/tests/__init__.py to IPython/kernel/inprocess/tests/__init__.py
@@ -16,9 +16,9 b' import sys'
16 16 import unittest
17 17
18 18 # Local imports
19 from IPython.inprocess.blockingkernelmanager import \
19 from IPython.kernel.inprocess.blockingkernelmanager import \
20 20 BlockingInProcessKernelManager
21 from IPython.inprocess.ipkernel import InProcessKernel
21 from IPython.kernel.inprocess.ipkernel import InProcessKernel
22 22 from IPython.testing.decorators import skipif_not_matplotlib
23 23 from IPython.utils.io import capture_output
24 24 from IPython.utils import py3compat
@@ -14,9 +14,9 b' from __future__ import print_function'
14 14 import unittest
15 15
16 16 # Local imports
17 from IPython.inprocess.blockingkernelmanager import \
17 from IPython.kernel.inprocess.blockingkernelmanager import \
18 18 BlockingInProcessKernelManager
19 from IPython.inprocess.ipkernel import InProcessKernel
19 from IPython.kernel.inprocess.ipkernel import InProcessKernel
20 20
21 21 #-----------------------------------------------------------------------------
22 22 # Test case
1 NO CONTENT: file renamed from IPython/kernel/zmq/tests/test_kernelmanager.py to IPython/kernel/tests/test_kernelmanager.py
@@ -13,7 +13,7 b''
13 13 #-----------------------------------------------------------------------------
14 14
15 15 from IPython.config import Configurable
16 from IPython.inprocess.socket import SocketABC
16 from IPython.kernel.inprocess.socket import SocketABC
17 17 from IPython.utils.jsonutil import json_clean
18 18 from IPython.utils.traitlets import Instance, Dict, CBytes
19 19 from IPython.kernel.zmq.serialize import serialize_object
@@ -2,7 +2,7 b' import __builtin__'
2 2 import sys
3 3
4 4 from IPython.core.displayhook import DisplayHook
5 from IPython.inprocess.socket import SocketABC
5 from IPython.kernel.inprocess.socket import SocketABC
6 6 from IPython.utils.jsonutil import encode_images
7 7 from IPython.utils.traitlets import Instance, Dict
8 8 from session import extract_header, Session
@@ -34,7 +34,7 b' from IPython.core.error import UsageError'
34 34 from IPython.core.magics import MacroToEdit, CodeMagics
35 35 from IPython.core.magic import magics_class, line_magic, Magics
36 36 from IPython.core.payloadpage import install_payload_page
37 from IPython.inprocess.socket import SocketABC
37 from IPython.kernel.inprocess.socket import SocketABC
38 38 from IPython.kernel import (
39 39 get_connection_file, get_connection_info, connect_qtconsole
40 40 )
@@ -238,6 +238,9 b' def make_exclude():'
238 238 if not have['wx']:
239 239 exclusions.append(ipjoin('lib', 'inputhookwx'))
240 240
241 if 'IPython.kernel.inprocess' not in sys.argv:
242 exclusions.append(ipjoin('kernel', 'inprocess'))
243
241 244 # FIXME: temporarily disable autoreload tests, as they can produce
242 245 # spurious failures in subsequent tests (cythonmagic).
243 246 exclusions.append(ipjoin('extensions', 'autoreload'))
@@ -246,7 +249,7 b' def make_exclude():'
246 249 # We do this unconditionally, so that the test suite doesn't import
247 250 # gtk, changing the default encoding and masking some unicode bugs.
248 251 exclusions.append(ipjoin('lib', 'inputhookgtk'))
249 exclusions.append(ipjoin('zmq', 'gui', 'gtkembed'))
252 exclusions.append(ipjoin('kernel', 'zmq', 'gui', 'gtkembed'))
250 253
251 254 # These have to be skipped on win32 because the use echo, rm, cd, etc.
252 255 # See ticket https://github.com/ipython/ipython/issues/87
@@ -261,7 +264,7 b' def make_exclude():'
261 264 ])
262 265
263 266 if not have['zmq']:
264 exclusions.append(ipjoin('zmq'))
267 exclusions.append(ipjoin('kernel'))
265 268 exclusions.append(ipjoin('frontend', 'qt'))
266 269 exclusions.append(ipjoin('frontend', 'html'))
267 270 exclusions.append(ipjoin('frontend', 'consoleapp.py'))
@@ -277,7 +280,7 b' def make_exclude():'
277 280 if not have['matplotlib']:
278 281 exclusions.extend([ipjoin('core', 'pylabtools'),
279 282 ipjoin('core', 'tests', 'test_pylabtools'),
280 ipjoin('zmq', 'pylab'),
283 ipjoin('kernel', 'zmq', 'pylab'),
281 284 ])
282 285
283 286 if not have['cython']:
@@ -430,11 +433,12 b' def make_runners(inc_slow=False):'
430 433 """
431 434
432 435 # Packages to be tested via nose, that only depend on the stdlib
433 nose_pkg_names = ['config', 'core', 'extensions', 'frontend', 'kernel', 'lib',
434 'testing', 'utils', 'nbformat', 'inprocess' ]
436 nose_pkg_names = ['config', 'core', 'extensions', 'frontend', 'lib',
437 'testing', 'utils', 'nbformat' ]
435 438
436 439 if have['zmq']:
437 nose_pkg_names.append('zmq')
440 nose_pkg_names.append('kernel')
441 nose_pkg_names.append('kernel.inprocess')
438 442 if inc_slow:
439 443 nose_pkg_names.append('parallel')
440 444
@@ -502,7 +506,7 b' def run_iptest():'
502 506 # assumptions about what needs to be a singleton and what doesn't (app
503 507 # objects should, individual shells shouldn't). But for now, this
504 508 # workaround allows the test suite for the inprocess module to complete.
505 if not 'IPython.inprocess' in sys.argv:
509 if not 'IPython.kernel.inprocess' in sys.argv:
506 510 globalipapp.start_ipython()
507 511
508 512 # Now nose can run
General Comments 0
You need to be logged in to leave comments. Login now