Skip to content

Commit d70a39d

Browse files
committed
only store the parent header in parent_headers
the old parent_header was actually the parent *message*, but we don't need to keep doing that
1 parent 31ec597 commit d70a39d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ipykernel/kernelbase.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ def _parent_header(self):
142142
DeprecationWarning,
143143
stacklevel=2,
144144
)
145-
return self.get_parent_header(channel="shell")
145+
# _parent_header wasn't actually the header, it was the *message*
146+
# but only promised access to the header
147+
return {"header": self.get_parent_header(channel="shell")}
146148

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

543547
def send_response(self, stream, msg_or_type, content=None, ident=None,

0 commit comments

Comments
 (0)