pyodide-kernel icon indicating copy to clipboard operation
pyodide-kernel copied to clipboard

Use the `comm` package

Open jtpio opened this issue 2 years ago • 7 comments

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 avatar Mar 30 '23 06:03 jtpio

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

jtpio avatar Mar 30 '23 19:03 jtpio

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 avatar Mar 30 '23 19:03 jtpio

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.

jtpio avatar Mar 30 '23 19:03 jtpio

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.

bollwyvl avatar Mar 30 '23 21:03 bollwyvl

@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

jtpio avatar Aug 02 '23 05:08 jtpio

Yes!

martinRenou avatar Aug 02 '23 05:08 martinRenou

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

bollwyvl avatar Aug 03 '23 03:08 bollwyvl