Open
Description
Metakernel creates a new CommManager
which is incompatible with jupyter widgets where a global singleton CommManager
is used. In addition, the comm channel name was changed from ipython.widget
to jupyter.widget
and jupyter.widget.control
was added.
https://github.com/Calysto/metakernel/blob/main/metakernel/_metakernel.py#L155
The correct comm registration (based on IPythonKernel) is:
self.comm_manager = comm.get_comm_manager() # Do not create a new comm manager, the rest of the system uses a singleton
comm_msg_types = ["comm_open", "comm_msg", "comm_close"]
for msg_type in comm_msg_types:
self.shell_handlers[msg_type] = getattr(self.comm_manager, msg_type)
import ipywidgets as widgets
widgets.register_comm_target() # Does the registration on behalf of ipywidgets
I'll see if I'll have time for a pull request :)
Metadata
Assignees
Labels
No labels
Activity