Skip to content

Commit 82b520f

Browse files
committed
Drop the now-unused shell_socket argument to ShellChannelThread
The thread only held the socket to hand on to SubshellManager, which no longer takes it: the reply goes out through the shell ZMQStream. Nothing read the attribute, so both the parameter and the field go.
1 parent c02bb76 commit 82b520f

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

ipykernel/kernelapp.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,11 +412,7 @@ def init_control(self, context):
412412
self.control_socket.router_handover = 1
413413

414414
self.control_thread = ControlThread(daemon=True)
415-
self.shell_channel_thread = ShellChannelThread(
416-
context,
417-
self.shell_socket,
418-
daemon=True,
419-
)
415+
self.shell_channel_thread = ShellChannelThread(context, daemon=True)
420416

421417
def init_iopub(self, context):
422418
"""Initialize the iopub channel."""

ipykernel/shellchannel.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,12 @@ class ShellChannelThread(BaseThread):
2222
def __init__(
2323
self,
2424
context: zmq.Context[Any],
25-
shell_socket: zmq.Socket[Any],
2625
**kwargs,
2726
):
2827
"""Initialize the thread."""
2928
super().__init__(name=SHELL_CHANNEL_THREAD_NAME, **kwargs)
3029
self._manager: SubshellManager | None = None
3130
self._zmq_context = context # Avoid use of self._context
32-
# No longer passed on to SubshellManager, which now sends on the shell channel
33-
# through the stream and never touches the socket. Nothing else reads this.
34-
self._shell_socket = shell_socket
3531
# Set by kernelapp.init_kernel after it builds the shell ZMQStream, since this
3632
# thread is created before the stream exists.
3733
self.shell_stream: ZMQStream | None = None

0 commit comments

Comments
 (0)