Skip to content

Commit d917e2c

Browse files
committed
Flush streams
1 parent dbe263b commit d917e2c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ipykernel/kernelbase.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,8 @@ async def shell_channel_thread_main(self, msg):
616616
except Exception:
617617
self.log.error("Invalid message", exc_info=True) # noqa: G201
618618

619+
self.shell_stream.flush()
620+
619621
async def shell_main(self, subshell_id: str | None, msg):
620622
"""Handler of shell messages for a single subshell"""
621623
if self._supports_kernel_subshells:
@@ -645,6 +647,7 @@ async def shell_main(self, subshell_id: str | None, msg):
645647
partial(self.shell_main, subshell_id),
646648
copy=False,
647649
)
650+
stream.flush()
648651

649652
def record_ports(self, ports):
650653
"""Record the ports that this kernel is using.

0 commit comments

Comments
 (0)