ipython / comm

Python Comm implementation for the Jupyter kernel protocol
BSD 3-Clause "New" or "Revised" License
9 stars 15 forks source link

Send back "comm_close" to unidentified/closed communications #18

Open dby-tmwctw opened 1 year ago

dby-tmwctw commented 1 year ago

Explanation of Motivation

Currently, sending communications to closed comm is a no-op. This caused sender to be unable to determine whether the backend hangs or the comm is closed, directly causing the bug described here: https://github.com/jupyter-widgets/ipywidgets/pull/3833. We noticed that similar case in comm_open requests would cause it to send back comm_closed: https://jupyter-client.readthedocs.io/en/latest/messaging.html#opening-a-comm, hence we propose this PR to do the same for comm_msg.

blink1073 commented 12 months ago

Hi @dby-tmwctw, I'm just catching up on this repo, is PR ready to be merged? Does https://github.com/jupyter-widgets/ipywidgets/pull/3833 depend on this PR, or the other way around, or are they independent?