Show More
@@ -18,10 +18,7 from zmq.eventloop import ioloop, zmqstream | |||
|
18 | 18 | |
|
19 | 19 | from IPython.core.release import kernel_protocol_version_info |
|
20 | 20 | |
|
21 |
from .channelsabc import |
|
|
22 | ShellChannelABC, IOPubChannelABC, | |
|
23 | HBChannelABC, StdInChannelABC, | |
|
24 | ) | |
|
21 | from .channelsabc import HBChannelABC | |
|
25 | 22 | from IPython.utils.py3compat import string_types, iteritems |
|
26 | 23 | |
|
27 | 24 | #----------------------------------------------------------------------------- |
@@ -24,38 +24,6 class ChannelABC(with_metaclass(abc.ABCMeta, object)): | |||
|
24 | 24 | pass |
|
25 | 25 | |
|
26 | 26 | |
|
27 | class ShellChannelABC(ChannelABC): | |
|
28 | """ShellChannel ABC. | |
|
29 | ||
|
30 | The docstrings for this class can be found in the base implementation: | |
|
31 | ||
|
32 | `IPython.kernel.channels.ShellChannel` | |
|
33 | """ | |
|
34 | ||
|
35 | ||
|
36 | class IOPubChannelABC(ChannelABC): | |
|
37 | """IOPubChannel ABC. | |
|
38 | ||
|
39 | The docstrings for this class can be found in the base implementation: | |
|
40 | ||
|
41 | `IPython.kernel.channels.IOPubChannel` | |
|
42 | """ | |
|
43 | ||
|
44 | @abc.abstractmethod | |
|
45 | def flush(self, timeout=1.0): | |
|
46 | pass | |
|
47 | ||
|
48 | ||
|
49 | class StdInChannelABC(ChannelABC): | |
|
50 | """StdInChannel ABC. | |
|
51 | ||
|
52 | The docstrings for this class can be found in the base implementation: | |
|
53 | ||
|
54 | `IPython.kernel.channels.StdInChannel` | |
|
55 | """ | |
|
56 | ||
|
57 | ||
|
58 | ||
|
59 | 27 | class HBChannelABC(ChannelABC): |
|
60 | 28 | """HBChannel ABC. |
|
61 | 29 |
@@ -13,9 +13,7 from IPython.utils.traitlets import ( | |||
|
13 | 13 | Any, Instance, Type, |
|
14 | 14 | ) |
|
15 | 15 | |
|
16 | from .channelsabc import ( | |
|
17 | ShellChannelABC, IOPubChannelABC, HBChannelABC, StdInChannelABC | |
|
18 | ) | |
|
16 | from .channelsabc import (ChannelABC, HBChannelABC) | |
|
19 | 17 | from .channels import ( |
|
20 | 18 | make_shell_socket, make_stdin_socket, make_iopub_socket |
|
21 | 19 | ) |
@@ -45,9 +43,9 class KernelClient(ConnectionFileMixin): | |||
|
45 | 43 | return zmq.Context.instance() |
|
46 | 44 | |
|
47 | 45 | # The classes to use for the various channels |
|
48 |
shell_channel_class = Type( |
|
|
49 |
iopub_channel_class = Type( |
|
|
50 |
stdin_channel_class = Type( |
|
|
46 | shell_channel_class = Type(ChannelABC) | |
|
47 | iopub_channel_class = Type(ChannelABC) | |
|
48 | stdin_channel_class = Type(ChannelABC) | |
|
51 | 49 | hb_channel_class = Type(HBChannelABC) |
|
52 | 50 | |
|
53 | 51 | # Protected traits |
@@ -3,10 +3,7 | |||
|
3 | 3 | # Copyright (c) IPython Development Team. |
|
4 | 4 | # Distributed under the terms of the Modified BSD License. |
|
5 | 5 | |
|
6 |
from IPython.kernel.channelsabc import |
|
|
7 | ShellChannelABC, IOPubChannelABC, | |
|
8 | HBChannelABC, StdInChannelABC, | |
|
9 | ) | |
|
6 | from IPython.kernel.channelsabc import HBChannelABC | |
|
10 | 7 | |
|
11 | 8 | from .socket import DummySocket |
|
12 | 9 |
@@ -37,9 +37,6 class QtHBChannel(SuperQObject, HBChannel): | |||
|
37 | 37 | |
|
38 | 38 | from IPython.core.release import kernel_protocol_version_info |
|
39 | 39 | |
|
40 | from IPython.kernel.channelsabc import ( | |
|
41 | ShellChannelABC, IOPubChannelABC, StdInChannelABC, | |
|
42 | ) | |
|
43 | 40 | from IPython.utils.py3compat import string_types, iteritems |
|
44 | 41 | |
|
45 | 42 | major_protocol_version = kernel_protocol_version_info[0] |
General Comments 0
You need to be logged in to leave comments.
Login now