@@ -48,15 +48,15 @@ kernel has dedicated sockets for the following functions:
48
48
each frontend and the kernel.
49
49
50
50
2. **IOPub **: this socket is the 'broadcast channel' where the kernel publishes all
51
- side effects (stdout, stderr, etc.) as well as the requests coming from any
52
- client over the shell socket and its own requests on the stdin socket. There
53
- are a number of actions in Python which generate side effects: :func: ` print `
54
- writes to ``sys.stdout ``, errors generate tracebacks, etc. Additionally, in
55
- a multi-client scenario, we want all frontends to be able to know what each
56
- other has sent to the kernel (this can be useful in collaborative scenarios,
57
- for example). This socket allows both side effects and the information
58
- about communications taking place with one client over the shell channel
59
- to be made available to all clients in a uniform manner.
51
+ side effects (stdout, stderr, debugging events etc.) as well as the requests
52
+ coming from any client over the shell socket and its own requests on the
53
+ stdin socket. There are a number of actions in Python which generate side
54
+ effects: :func: ` print ` writes to ``sys.stdout ``, errors generate tracebacks,
55
+ etc. Additionally, in a multi-client scenario, we want all frontends to be
56
+ able to know what each other has sent to the kernel (this can be useful in
57
+ collaborative scenarios, for example). This socket allows both side effects
58
+ and the information about communications taking place with one client over
59
+ the shell channel to be made available to all clients in a uniform manner.
60
60
61
61
3. **stdin **: this ROUTER socket is connected to all frontends, and it allows
62
62
the kernel to request input from the active frontend when :func: `raw_input ` is called.
@@ -72,8 +72,9 @@ kernel has dedicated sockets for the following functions:
72
72
which ones are from other clients, so they can display each type
73
73
appropriately.
74
74
75
- 4. **Control **: This channel is identical to Shell, but operates on a separate socket,
76
- to allow important messages to avoid queueing behind execution requests (e.g. shutdown or abort).
75
+ 4. **Control **: This channel is identical to Shell, but operates on a separate
76
+ socket to avoid queueing behind execution requests. The control channel is
77
+ used for shutdown and restart messages, as well as for debugging messages.
77
78
78
79
5. **Heartbeat **: This socket allows for simple bytestring messages to be sent
79
80
between the frontend and the kernel to ensure that they are still connected.
@@ -837,8 +838,6 @@ Message type: ``comm_info_reply``::
837
838
838
839
.. versionadded :: 5.1
839
840
840
- ``comm_info `` is a proposed addition for msgspec v5.1.
841
-
842
841
.. _msging_kernel_info :
843
842
844
843
Kernel info
@@ -943,6 +942,9 @@ and `codemirror modes <http://codemirror.net/mode/index.html>`_ for those fields
943
942
944
943
``language `` moved to ``language_info.name ``
945
944
945
+ Messages on the Control (ROUTER/DEALER) channel
946
+ ===============================================
947
+
946
948
.. _msging_shutdown :
947
949
948
950
Kernel shutdown
@@ -988,8 +990,6 @@ Message type: ``shutdown_reply``::
988
990
989
991
Sending a ``shutdown_request `` message on the ``shell `` channel is deprecated.
990
992
991
-
992
-
993
993
.. _msging_interrupt :
994
994
995
995
Kernel interrupt
@@ -1011,11 +1011,31 @@ Message type: ``interrupt_reply``::
1011
1011
1012
1012
.. versionadded :: 5.3
1013
1013
1014
+ Debug request
1015
+ -------------
1014
1016
1015
- Messages on the IOPub (PUB/SUB) channel
1016
- =======================================
1017
+ This message type is used with debugging kernels to request specific actions
1018
+ to be performed by the debugger such as adding a breakpoint or stepping into
1019
+ a code.
1020
+
1021
+ Message type: ``debug_request ``::
1022
+
1023
+ content = {}
1024
+
1025
+ Message type: ``debug_reply ``::
1026
+
1027
+ content = {}
1028
+
1029
+ The ``content `` dict can be any JSON information used by debugging frontends
1030
+ and kernels.
1017
1031
1032
+ Debug requests and replies are sent over the `control ` channel to prevent queuing
1033
+ behind execution requests.
1018
1034
1035
+ .. versionadded :: 5.5
1036
+
1037
+ Messages on the IOPub (PUB/SUB) channel
1038
+ =======================================
1019
1039
1020
1040
Streams (stdout, stderr, etc)
1021
1041
------------------------------
@@ -1284,6 +1304,22 @@ Message type: ``clear_output``::
1284
1304
The selective clearing keys are ignored in v4 and the default behavior remains the same,
1285
1305
so v4 clear_output messages will be safely handled by a v4.1 frontend.
1286
1306
1307
+ .. _debug_event :
1308
+
1309
+ Debug event
1310
+ -----------
1311
+
1312
+ This message type is used by debugging kernels to send debugging events to the
1313
+ frontend.
1314
+
1315
+ Message type: ``debug_event ``::
1316
+
1317
+ content = {}
1318
+
1319
+ The ``content `` dict can be any JSON information used by debugging frontends.
1320
+
1321
+ .. versionadded :: 5.5
1322
+
1287
1323
.. _stdin_messages :
1288
1324
1289
1325
Messages on the stdin (ROUTER/DEALER) channel
@@ -1355,7 +1391,6 @@ Heartbeat for kernels
1355
1391
Clients send ping messages on a REQ socket, which are echoed right back
1356
1392
from the Kernel's REP socket. These are simple bytestrings, not full JSON messages described above.
1357
1393
1358
-
1359
1394
Custom Messages
1360
1395
===============
1361
1396
@@ -1367,8 +1402,7 @@ To do this, IPython adds a notion of a ``Comm``, which exists on both sides,
1367
1402
and can communicate in either direction.
1368
1403
1369
1404
These messages are fully symmetrical - both the Kernel and the Frontend can send each message,
1370
- and no messages expect a reply.
1371
- The Kernel listens for these messages on the Shell channel,
1405
+ and no messages expect a reply. The Kernel listens for these messages on the Shell channel,
1372
1406
and the Frontend listens for them on the IOPub channel.
1373
1407
1374
1408
Opening a Comm
0 commit comments