You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ipywidgets currently depends on ipykernel to get access to the Comm implementation and a couple of other goodies. But it becomes clear that ipywidgets could be used in other contexts than ipykernel, either from another "classic" Python kernel like xeus-python (see related issue jupyter-xeus/xeus-python#342) or from "front-end" kernels like Pyodide (see related issue https://github.com/jtpio/jupyterlite/issues/18).
Note that ipywidgets might not be the right place to open this issue, as it's not the only library making use of Comms.
Proposed Solution
It would be nice to have an optional dependency on ipykernel for now. And on the long term find another way of importing the Comm class. One way to do that could be through entry points (but are entry points supported by Pyodide?).
Problem
ipywidgets currently depends on ipykernel to get access to the Comm implementation and a couple of other goodies. But it becomes clear that ipywidgets could be used in other contexts than ipykernel, either from another "classic" Python kernel like xeus-python (see related issue jupyter-xeus/xeus-python#342) or from "front-end" kernels like Pyodide (see related issue https://github.com/jtpio/jupyterlite/issues/18).
The current way xeus-python deals with this is by monkey patching the ipykernel module to inject its own Comm class that forwards messages through the xeus communication.
Something similar could be done for Pyodide, but we are facing the problem that ipywidgets depends on ipykernel which itself depends on system libraries like "termios" which cannot be installed on the front-end (see https://github.com/jtpio/jupyterlite/issues/18#issuecomment-854030491).
Note that ipywidgets might not be the right place to open this issue, as it's not the only library making use of Comms.
Proposed Solution
It would be nice to have an optional dependency on ipykernel for now. And on the long term find another way of importing the Comm class. One way to do that could be through entry points (but are entry points supported by Pyodide?).
Additional context
jupyter-xeus/xeus-python#342
https://github.com/jtpio/jupyterlite/issues/18
The text was updated successfully, but these errors were encountered: