Show More
@@ -34,8 +34,8 b' import uuid' | |||||
34 | from IPython.config.application import boolean_flag |
|
34 | from IPython.config.application import boolean_flag | |
35 | from IPython.config.configurable import Configurable |
|
35 | from IPython.config.configurable import Configurable | |
36 | from IPython.core.profiledir import ProfileDir |
|
36 | from IPython.core.profiledir import ProfileDir | |
37 |
from IPython. |
|
37 | from IPython.kernel.blockingkernelmanager import BlockingKernelManager | |
38 |
from IPython. |
|
38 | from IPython.kernel.kernelmanager import KernelManager | |
39 | from IPython.kernel import tunnel_to_kernel, find_connection_file, swallow_argv |
|
39 | from IPython.kernel import tunnel_to_kernel, find_connection_file, swallow_argv | |
40 | from IPython.utils.path import filefind |
|
40 | from IPython.utils.path import filefind | |
41 | from IPython.utils.py3compat import str_to_bytes |
|
41 | from IPython.utils.py3compat import str_to_bytes |
@@ -41,7 +41,7 b' class MultiKernelManager(LoggingConfigurable):' | |||||
41 | """A class for managing multiple kernels.""" |
|
41 | """A class for managing multiple kernels.""" | |
42 |
|
42 | |||
43 | kernel_manager_class = DottedObjectName( |
|
43 | kernel_manager_class = DottedObjectName( | |
44 |
"IPython. |
|
44 | "IPython.kernel.blockingkernelmanager.BlockingKernelManager", config=True, | |
45 | help="""The kernel manager class. This is configurable to allow |
|
45 | help="""The kernel manager class. This is configurable to allow | |
46 | subclassing of the KernelManager for customized behavior. |
|
46 | subclassing of the KernelManager for customized behavior. | |
47 | """ |
|
47 | """ |
@@ -9,7 +9,7 b' from IPython.testing import decorators as dec' | |||||
9 | from IPython.config.loader import Config |
|
9 | from IPython.config.loader import Config | |
10 | from IPython.frontend.html.notebook.kernelmanager import MultiKernelManager |
|
10 | from IPython.frontend.html.notebook.kernelmanager import MultiKernelManager | |
11 | from IPython.utils.localinterfaces import LOCALHOST |
|
11 | from IPython.utils.localinterfaces import LOCALHOST | |
12 |
from IPython. |
|
12 | from IPython.kernel.kernelmanager import KernelManager | |
13 |
|
13 | |||
14 | class TestKernelManager(TestCase): |
|
14 | class TestKernelManager(TestCase): | |
15 |
|
15 |
@@ -3,7 +3,7 b'' | |||||
3 |
|
3 | |||
4 | # Local imports. |
|
4 | # Local imports. | |
5 | from IPython.utils.traitlets import Type |
|
5 | from IPython.utils.traitlets import Type | |
6 |
from IPython. |
|
6 | from IPython.kernel.kernelmanager import ShellChannel, IOPubChannel, \ | |
7 | StdInChannel, HBChannel, KernelManager |
|
7 | StdInChannel, HBChannel, KernelManager | |
8 | from base_kernelmanager import QtShellChannelMixin, QtIOPubChannelMixin, \ |
|
8 | from base_kernelmanager import QtShellChannelMixin, QtIOPubChannelMixin, \ | |
9 | QtStdInChannelMixin, QtHBChannelMixin, QtKernelManagerMixin |
|
9 | QtStdInChannelMixin, QtHBChannelMixin, QtKernelManagerMixin |
@@ -10,7 +10,7 b' import sys' | |||||
10 | import unittest |
|
10 | import unittest | |
11 | import base64 |
|
11 | import base64 | |
12 |
|
12 | |||
13 |
from IPython. |
|
13 | from IPython.kernel.kernelmanager import KernelManager | |
14 | from IPython.frontend.terminal.console.interactiveshell \ |
|
14 | from IPython.frontend.terminal.console.interactiveshell \ | |
15 | import ZMQTerminalInteractiveShell |
|
15 | import ZMQTerminalInteractiveShell | |
16 | from IPython.utils.tempdir import TemporaryDirectory |
|
16 | from IPython.utils.tempdir import TemporaryDirectory |
@@ -19,7 +19,7 b' from IPython.utils.io import raw_print' | |||||
19 | from IPython.utils.traitlets import Type |
|
19 | from IPython.utils.traitlets import Type | |
20 | from kernelmanager import InProcessKernelManager, InProcessShellChannel, \ |
|
20 | from kernelmanager import InProcessKernelManager, InProcessShellChannel, \ | |
21 | InProcessIOPubChannel, InProcessStdInChannel |
|
21 | InProcessIOPubChannel, InProcessStdInChannel | |
22 |
from IPython. |
|
22 | from IPython.kernel.blockingkernelmanager import BlockingChannelMixin | |
23 |
|
23 | |||
24 |
|
24 | |||
25 | #----------------------------------------------------------------------------- |
|
25 | #----------------------------------------------------------------------------- |
@@ -76,7 +76,7 b' class InProcessChannel(object):' | |||||
76 |
|
76 | |||
77 |
|
77 | |||
78 | class InProcessShellChannel(InProcessChannel): |
|
78 | class InProcessShellChannel(InProcessChannel): | |
79 |
"""See `IPython. |
|
79 | """See `IPython.kernel.kernelmanager.ShellChannel` for docstrings.""" | |
80 |
|
80 | |||
81 | # flag for whether execute requests should be allowed to call raw_input |
|
81 | # flag for whether execute requests should be allowed to call raw_input | |
82 | allow_stdin = True |
|
82 | allow_stdin = True | |
@@ -141,14 +141,14 b' class InProcessShellChannel(InProcessChannel):' | |||||
141 |
|
141 | |||
142 |
|
142 | |||
143 | class InProcessIOPubChannel(InProcessChannel): |
|
143 | class InProcessIOPubChannel(InProcessChannel): | |
144 |
"""See `IPython. |
|
144 | """See `IPython.kernel.kernelmanager.IOPubChannel` for docstrings.""" | |
145 |
|
145 | |||
146 | def flush(self, timeout=1.0): |
|
146 | def flush(self, timeout=1.0): | |
147 | pass |
|
147 | pass | |
148 |
|
148 | |||
149 |
|
149 | |||
150 | class InProcessStdInChannel(InProcessChannel): |
|
150 | class InProcessStdInChannel(InProcessChannel): | |
151 |
"""See `IPython. |
|
151 | """See `IPython.kernel.kernelmanager.StdInChannel` for docstrings.""" | |
152 |
|
152 | |||
153 | def input(self, string): |
|
153 | def input(self, string): | |
154 | kernel = self.manager.kernel |
|
154 | kernel = self.manager.kernel | |
@@ -158,7 +158,7 b' class InProcessStdInChannel(InProcessChannel):' | |||||
158 |
|
158 | |||
159 |
|
159 | |||
160 | class InProcessHBChannel(InProcessChannel): |
|
160 | class InProcessHBChannel(InProcessChannel): | |
161 |
"""See `IPython. |
|
161 | """See `IPython.kernel.kernelmanager.HBChannel` for docstrings.""" | |
162 |
|
162 | |||
163 | time_to_dead = 3.0 |
|
163 | time_to_dead = 3.0 | |
164 |
|
164 | |||
@@ -187,7 +187,7 b' class InProcessKernelManager(Configurable):' | |||||
187 | `IPython.kernel.kernelmanagerabc.KernelManagerABC` and allows |
|
187 | `IPython.kernel.kernelmanagerabc.KernelManagerABC` and allows | |
188 | (asynchronous) frontends to be used seamlessly with an in-process kernel. |
|
188 | (asynchronous) frontends to be used seamlessly with an in-process kernel. | |
189 |
|
189 | |||
190 |
See `IPython. |
|
190 | See `IPython.kernel.kernelmanager.KernelManager` for docstrings. | |
191 | """ |
|
191 | """ | |
192 |
|
192 | |||
193 | # The Session to use for building messages. |
|
193 | # The Session to use for building messages. |
1 | NO CONTENT: file renamed from IPython/zmq/blockingkernelmanager.py to IPython/kernel/blockingkernelmanager.py |
|
NO CONTENT: file renamed from IPython/zmq/blockingkernelmanager.py to IPython/kernel/blockingkernelmanager.py |
@@ -15,7 +15,7 b' TODO' | |||||
15 | # Imports |
|
15 | # Imports | |
16 | #----------------------------------------------------------------------------- |
|
16 | #----------------------------------------------------------------------------- | |
17 |
|
17 | |||
18 |
# Standard library imports |
|
18 | # Standard library imports | |
19 | import atexit |
|
19 | import atexit | |
20 | import errno |
|
20 | import errno | |
21 | import json |
|
21 | import json | |
@@ -26,14 +26,14 b' import sys' | |||||
26 | from threading import Thread |
|
26 | from threading import Thread | |
27 | import time |
|
27 | import time | |
28 |
|
28 | |||
29 |
# System library imports |
|
29 | # System library imports | |
30 | import zmq |
|
30 | import zmq | |
31 | # import ZMQError in top-level namespace, to avoid ugly attribute-error messages |
|
31 | # import ZMQError in top-level namespace, to avoid ugly attribute-error messages | |
32 | # during garbage collection of threads at exit: |
|
32 | # during garbage collection of threads at exit: | |
33 | from zmq import ZMQError |
|
33 | from zmq import ZMQError | |
34 | from zmq.eventloop import ioloop, zmqstream |
|
34 | from zmq.eventloop import ioloop, zmqstream | |
35 |
|
35 | |||
36 |
# Local imports |
|
36 | # Local imports | |
37 | from IPython.config.configurable import Configurable |
|
37 | from IPython.config.configurable import Configurable | |
38 | from IPython.utils.localinterfaces import LOCALHOST, LOCAL_IPS |
|
38 | from IPython.utils.localinterfaces import LOCALHOST, LOCAL_IPS | |
39 | from IPython.utils.traitlets import ( |
|
39 | from IPython.utils.traitlets import ( | |
@@ -45,7 +45,7 b' from IPython.kernel import (' | |||||
45 | make_ipkernel_cmd, |
|
45 | make_ipkernel_cmd, | |
46 | launch_kernel, |
|
46 | launch_kernel, | |
47 | ) |
|
47 | ) | |
48 | from session import Session |
|
48 | from IPython.zmq.session import Session | |
49 | from IPython.kernel import ( |
|
49 | from IPython.kernel import ( | |
50 | ShellChannelABC, IOPubChannelABC, |
|
50 | ShellChannelABC, IOPubChannelABC, | |
51 | HBChannelABC, StdInChannelABC, |
|
51 | HBChannelABC, StdInChannelABC, |
@@ -42,7 +42,7 b' class ShellChannelABC(ChannelABC):' | |||||
42 |
|
42 | |||
43 | The docstrings for this class can be found in the base implementation: |
|
43 | The docstrings for this class can be found in the base implementation: | |
44 |
|
44 | |||
45 |
`IPython. |
|
45 | `IPython.kernel.kernelmanager.ShellChannel` | |
46 | """ |
|
46 | """ | |
47 |
|
47 | |||
48 | @abc.abstractproperty |
|
48 | @abc.abstractproperty | |
@@ -80,7 +80,7 b' class IOPubChannelABC(ChannelABC):' | |||||
80 |
|
80 | |||
81 | The docstrings for this class can be found in the base implementation: |
|
81 | The docstrings for this class can be found in the base implementation: | |
82 |
|
82 | |||
83 |
`IPython. |
|
83 | `IPython.kernel.kernelmanager.IOPubChannel` | |
84 | """ |
|
84 | """ | |
85 |
|
85 | |||
86 | @abc.abstractmethod |
|
86 | @abc.abstractmethod | |
@@ -93,7 +93,7 b' class StdInChannelABC(ChannelABC):' | |||||
93 |
|
93 | |||
94 | The docstrings for this class can be found in the base implementation: |
|
94 | The docstrings for this class can be found in the base implementation: | |
95 |
|
95 | |||
96 |
`IPython. |
|
96 | `IPython.kernel.kernelmanager.StdInChannel` | |
97 | """ |
|
97 | """ | |
98 |
|
98 | |||
99 | @abc.abstractmethod |
|
99 | @abc.abstractmethod | |
@@ -106,7 +106,7 b' class HBChannelABC(ChannelABC):' | |||||
106 |
|
106 | |||
107 | The docstrings for this class can be found in the base implementation: |
|
107 | The docstrings for this class can be found in the base implementation: | |
108 |
|
108 | |||
109 |
`IPython. |
|
109 | `IPython.kernel.kernelmanager.HBChannel` | |
110 | """ |
|
110 | """ | |
111 |
|
111 | |||
112 | @abc.abstractproperty |
|
112 | @abc.abstractproperty | |
@@ -135,7 +135,7 b' class KernelManagerABC(object):' | |||||
135 |
|
135 | |||
136 | The docstrings for this class can be found in the base implementation: |
|
136 | The docstrings for this class can be found in the base implementation: | |
137 |
|
137 | |||
138 |
`IPython. |
|
138 | `IPython.kernel.kernelmanager.KernelManager` | |
139 | """ |
|
139 | """ | |
140 |
|
140 | |||
141 | __metaclass__ = abc.ABCMeta |
|
141 | __metaclass__ = abc.ABCMeta |
1 | NO CONTENT: file renamed from IPython/zmq/tests/test_message_spec.py to IPython/kernel/tests/test_message_spec.py |
|
NO CONTENT: file renamed from IPython/zmq/tests/test_message_spec.py to IPython/kernel/tests/test_message_spec.py |
@@ -45,7 +45,7 b" def check_for_zmq(minimum_version, module='IPython.zmq'):" | |||||
45 | check_for_zmq('2.1.11') |
|
45 | check_for_zmq('2.1.11') | |
46 | patch_pyzmq() |
|
46 | patch_pyzmq() | |
47 |
|
47 | |||
48 | from .blockingkernelmanager import BlockingKernelManager |
|
48 | from IPython.kernel.blockingkernelmanager import BlockingKernelManager | |
49 | from .kernelmanager import * |
|
49 | from IPython.kernel.kernelmanager import * | |
50 | from .session import Session |
|
50 | from .session import Session | |
51 |
|
51 |
@@ -22,7 +22,7 b' from subprocess import Popen, PIPE' | |||||
22 |
|
22 | |||
23 | import nose.tools as nt |
|
23 | import nose.tools as nt | |
24 |
|
24 | |||
25 |
from IPython. |
|
25 | from IPython.kernel.blockingkernelmanager import BlockingKernelManager | |
26 | from IPython.utils import path, py3compat |
|
26 | from IPython.utils import path, py3compat | |
27 |
|
27 | |||
28 | #------------------------------------------------------------------------------- |
|
28 | #------------------------------------------------------------------------------- |
@@ -7,7 +7,7 b' from unittest import TestCase' | |||||
7 | from IPython.testing import decorators as dec |
|
7 | from IPython.testing import decorators as dec | |
8 |
|
8 | |||
9 | from IPython.config.loader import Config |
|
9 | from IPython.config.loader import Config | |
10 |
from IPython. |
|
10 | from IPython.kernel.kernelmanager import KernelManager | |
11 |
|
11 | |||
12 | class TestKernelManager(TestCase): |
|
12 | class TestKernelManager(TestCase): | |
13 |
|
13 |
General Comments 0
You need to be logged in to leave comments.
Login now