Skip to content

Commit 2bf3530

Browse files
takluyverrgbkrk
authored andcommitted
Add note on compatibility to messaging spec
Closes jupyter/notebook#1574
1 parent 41eca1c commit 2bf3530

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/messaging.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,27 @@ A message is defined by the following four-dictionary structure::
133133
so implementers are strongly encouraged to include it.
134134
It will be mandatory in 5.1.
135135

136+
.. _msging_compatibility:
137+
138+
Compatibility
139+
=============
140+
141+
Kernels must implement the :ref:`execute <execute>` and :ref:`kernel info
142+
<msging_kernel_info>` messages in order to be usable. All other message types
143+
are optional, although we recommend implementing :ref:`completion
144+
<msging_completion>` if possible. Kernels do not need to send any reply for
145+
messages they don't handle, and frontends should provide sensible behaviour if
146+
no reply arrives (except for the required execution and kernel info messages).
147+
148+
:ref:`stdin messages <stdin_messages>` are unique in that the request comes from
149+
the kernel, and the reply from the frontend. The frontend is not required to
150+
support this, but if it does not, it must set ``'allow_stdin' : False`` in
151+
its :ref:`execute requests <execute>`. In this case, the kernel may not send
152+
stdin requests. If that field is true, the kernel may send stdin requests and
153+
block waiting for a reply, so the frontend must answer.
154+
155+
Both sides should allow unexpected message types, and extra fields in known
156+
message types, so that additions to the protocol do not break existing code.
136157

137158
.. _wire_protocol:
138159

0 commit comments

Comments
 (0)