jupyter_client
jupyter_client copied to clipboard
Allow input on comm messages
The execute request message has an allow_stdin parameter to instruct the kernel if input could be handled. However, the comm messages do not have a similar parameter, which means, for example, you can't set a breakpoint in a comm message handler and have interactive debugging.
If we had such a parameter in comm messages, they would no longer be symmetric, but this is still an important usecase.
See https://github.com/jupyter-widgets/ipywidgets/issues/1603, CC @TimShawver.
For an implementation, it looks like essentially, we'd need to do something like https://github.com/ipython/ipykernel/blob/8acaee80c83c9a64a22afde522f9df2d0c3638e4/ipykernel/ipkernel.py#L200 and https://github.com/ipython/ipykernel/blob/8acaee80c83c9a64a22afde522f9df2d0c3638e4/ipykernel/ipkernel.py#L206 when processing comm messages, i.e.:
- https://github.com/ipython/ipykernel/blob/8acaee80c83c9a64a22afde522f9df2d0c3638e4/ipykernel/comm/manager.py#L90
- https://github.com/ipython/ipykernel/blob/8acaee80c83c9a64a22afde522f9df2d0c3638e4/ipykernel/comm/manager.py#L111
- https://github.com/ipython/ipykernel/blob/8acaee80c83c9a64a22afde522f9df2d0c3638e4/ipykernel/comm/manager.py#L126
Thoughts?
Probably makes sense.
Any update to this issue?