Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion ipykernel/inprocess/ipkernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _input_request(self, prompt, ident, parent, password=False):
content = json_clean(dict(prompt=prompt, password=password))
msg = self.session.msg('input_request', content, parent)
for frontend in self.frontends:
if frontend.session.session == parent['header']['session']:
if frontend.session.session == parent['session']:
frontend.stdin_channel.call_handlers(msg)
break
else:
Expand Down
6 changes: 5 additions & 1 deletion ipykernel/kernelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ def _parent_header(self):
DeprecationWarning,
stacklevel=2,
)
return self.get_parent_header(channel="shell")
# _parent_header wasn't actually the header, it was the *message*
# but only promised access to the header
return {"header": self.get_parent_header(channel="shell")}

# Time to sleep after flushing the stdout/err buffers in each execute
# cycle. While this introduces a hard limit on the minimal latency of the
Expand Down Expand Up @@ -538,6 +540,8 @@ def set_parent(self, ident, parent, channel='shell'):
on the stdin channel.
"""
self._parent_ident[channel] = ident
if parent and 'header' in parent:
parent = parent['header']
self._parent_headers[channel] = parent

def send_response(self, stream, msg_or_type, content=None, ident=None,
Expand Down