File tree Expand file tree Collapse file tree 2 files changed +16
-14
lines changed
jupyter_server/services/kernels/connection Expand file tree Collapse file tree 2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 44
55from jupyter_client .session import Session
66from tornado .websocket import WebSocketHandler
7- from traitlets import Float , Instance , default
7+ from traitlets import Float , Instance , Unicode , default
88from traitlets .config import LoggingConfigurable
99
1010try :
1414
1515from jupyter_client .jsonutil import extract_dates
1616
17+ from jupyter_server .transutils import _i18n
18+
1719from .abc import KernelWebsocketConnectionABC
1820
1921
@@ -110,6 +112,19 @@ def deserialize_msg_from_ws_v1(ws_msg):
110112class BaseKernelWebsocketConnection (LoggingConfigurable ):
111113 """A configurable base class for connecting Kernel WebSockets to ZMQ sockets."""
112114
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+
113128 @property
114129 def kernel_manager (self ):
115130 """The kernel manager."""
Original file line number Diff line number Diff line change @@ -85,19 +85,6 @@ class ZMQChannelsWebsocketConnection(BaseKernelWebsocketConnection):
8585 ),
8686 )
8787
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-
10188 @property
10289 def write_message (self ):
10390 """Alias to the websocket handler's write_message method."""
You can’t perform that action at this time.
0 commit comments