Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update for some jupyter_client 7.0 API changes #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions knitty/stitch/stitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,12 +714,12 @@ def run_code(code: str, kp: KernelPair, timeout=None):
msg_id = kp.kc.execute(code)
while True:
try:
msg = kp.kc.shell_channel.get_msg(timeout=timeout)
msg = kp.kc.get_shell_msg(timeout=timeout)
except Empty:
# TODO: Log error
raise

if msg['parent_header'].get('msg_id') == msg_id:
if msg['parent_header']['msg_id'] == msg_id:
break
else:
# not our reply
Expand All @@ -734,11 +734,11 @@ def run_code(code: str, kp: KernelPair, timeout=None):
# in certain CI systems, waiting < 1 second might miss messages.
# So long as the kernel sends a status:idle message when it
# finishes, we won't actually have to wait this long, anyway.
msg = kp.kc.iopub_channel.get_msg(timeout=4)
msg = kp.kc.get_iopub_msg(timeout=4)
except Empty:
pass
# TODO: Log error
if msg['parent_header'].get('msg_id') != msg_id:
if msg['parent_header']['msg_id'] != msg_id:
# not an output from our execution
continue

Expand Down