jupyterlite / pyodide-kernel

Python kernel for JupyterLite powered by Pyodide
https://jupyterlite-pyodide-kernel.readthedocs.io/en/latest/_static/
BSD 3-Clause "New" or "Revised" License
44 stars 22 forks source link

Use the `comm` package #37

Open jtpio opened 1 year ago

jtpio commented 1 year ago

Problem

It should now be possible to use the new comm package: https://pypi.org/project/comm/

Currently there is a mock for ipykernel here: https://github.com/jupyterlite/pyodide-kernel/tree/main/packages/pyodide-kernel/py/ipykernel

Which hopefully could be removed.

Proposed Solution

Use the comm package so can get rid of one of the mocks.

Additional context

https://github.com/jupyterlite/jupyterlite/issues/18

jtpio commented 1 year ago

Actually not sure since ipywidgets initially dropped ipykernel, but then added it back in https://github.com/jupyter-widgets/ipywidgets/pull/3749.

jtpio commented 1 year ago

Hmm looks like the latest ipywidgets releases break widgets in the Pyodide kernel:

image

The latest that seems to work is 8.0.4:

image

jtpio commented 1 year ago

The latest that seems to work is 8.0.4:

cc @martinRenou who might know if this is related to a change in ipywidgets in 8.0.5 or 8.0.6.

bollwyvl commented 1 year ago

Yep bottom pins are tighter now, basically to get around the structuredClone SNAFU. Need to bump the mock packages... Older 8.x and 7.x ones will be compatible.

But also should be pinning for reproducible builds with front and backend.

As for comm.... Well that's not been very smooth either, and the ipykernel dep is still carried by ipywidgets.

jtpio commented 11 months ago

@martinRenou looks like the 8.1.0 release of package of widgets means we could start using the comm package here? https://github.com/jupyter-widgets/ipywidgets/releases/tag/8.1.0

Which would help fix https://github.com/jupyter-widgets/ipywidgets/issues/3819

martinRenou commented 11 months ago

Yes!

bollwyvl commented 11 months ago

Better do something, because https://github.com/jupyter-widgets/ipywidgets/pull/3811#issuecomment-1663249084