Commit ecd2822 1 parent e6be0fa commit ecd2822 Copy full SHA for ecd2822
File tree 2 files changed +16
-14
lines changed
jupyter_server/services/kernels/connection
2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 4
4
5
5
from jupyter_client .session import Session
6
6
from tornado .websocket import WebSocketHandler
7
- from traitlets import Float , Instance , default
7
+ from traitlets import Float , Instance , Unicode , default
8
8
from traitlets .config import LoggingConfigurable
9
9
10
10
try :
14
14
15
15
from jupyter_client .jsonutil import extract_dates
16
16
17
+ from jupyter_server .transutils import _i18n
18
+
17
19
from .abc import KernelWebsocketConnectionABC
18
20
19
21
@@ -110,6 +112,19 @@ def deserialize_msg_from_ws_v1(ws_msg):
110
112
class BaseKernelWebsocketConnection (LoggingConfigurable ):
111
113
"""A configurable base class for connecting Kernel WebSockets to ZMQ sockets."""
112
114
115
+ kernel_ws_protocol = Unicode (
116
+ None ,
117
+ allow_none = True ,
118
+ config = True ,
119
+ help = _i18n (
120
+ "Preferred kernel message protocol over websocket to use (default: None). "
121
+ "If an empty string is passed, select the legacy protocol. If None, "
122
+ "the selected protocol will depend on what the front-end supports "
123
+ "(usually the most recent protocol supported by the back-end and the "
124
+ "front-end)."
125
+ ),
126
+ )
127
+
113
128
@property
114
129
def kernel_manager (self ):
115
130
"""The kernel manager."""
Original file line number Diff line number Diff line change @@ -85,19 +85,6 @@ class ZMQChannelsWebsocketConnection(BaseKernelWebsocketConnection):
85
85
),
86
86
)
87
87
88
- kernel_ws_protocol = Unicode (
89
- None ,
90
- allow_none = True ,
91
- config = True ,
92
- help = _i18n (
93
- "Preferred kernel message protocol over websocket to use (default: None). "
94
- "If an empty string is passed, select the legacy protocol. If None, "
95
- "the selected protocol will depend on what the front-end supports "
96
- "(usually the most recent protocol supported by the back-end and the "
97
- "front-end)."
98
- ),
99
- )
100
-
101
88
@property
102
89
def write_message (self ):
103
90
"""Alias to the websocket handler's write_message method."""
You can’t perform that action at this time.
0 commit comments