Skip to content

ipywidgets 8 compatibility#6912

Merged
jacobtomlinson merged 6 commits intodask:mainfrom
jrbourbeau:ipywidgets-8
Aug 19, 2022
Merged

ipywidgets 8 compatibility#6912
jacobtomlinson merged 6 commits intodask:mainfrom
jrbourbeau:ipywidgets-8

Conversation

@jrbourbeau
Copy link
Copy Markdown
Member

This seems to work for me locally, but I'll admit I don't have much context around ipywidgets. cc @ian-r-rose @jacobtomlinson who may have thoughts

Note: I've not yet checked how backwards compatible these changes are

Closes #6909

Copy link
Copy Markdown
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh interesting I didn't know this was changing. I expect we use _ipython_display_ in other places in Dask outside of distributed.

@ian-r-rose could you advise on the right way to handle this?

@crusaderky
Copy link
Copy Markdown
Collaborator

Please merge from main and revert #6910

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 18, 2022

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

       15 files  ±0         15 suites  ±0   6h 28m 57s ⏱️ + 1m 22s
  3 005 tests ±0    2 921 ✔️ +1    83 💤 +1  1  - 2 
22 239 runs  ±0  21 268 ✔️  - 2  970 💤 +4  1  - 2 

For more details on these failures, see this check.

Results for commit 715804c. ± Comparison against base commit 58a5a3c.

♻️ This comment has been updated with latest results.

@crusaderky crusaderky changed the title ipywidgets 8 compatability ipywidgets 8 compatibility Aug 18, 2022
@ian-r-rose
Copy link
Copy Markdown
Collaborator

Oh interesting I didn't know this was changing. I expect we use _ipython_display_ in other places in Dask outside of distributed.

@ian-r-rose could you advise on the right way to handle this?

The tricky thing is supporting both ipywidgets~=7 and ipywidgets~=8 here. Generally speaking, we should prefer _repr_mimebundle_ to _ipython_display_, which is why ipywidgets made the change. The difference is that _repr_mimebundle_ is supposed to just return a dictionary keyed by mimetype, and the frontend can decide which repr it wants to/is able to display. _ipython_display_, on the other hand, is supposed to display as a side effect.

Since we probably don't want to go ipywidgets==8 exclusively, I don't think we can fully commit to using _repr_mimebundle_ everywhere. I've pushed a commit with what I think is the best way forward: we stick with _ipython_display_ for now but use _repr_mimebundle_ when available.

Copy link
Copy Markdown
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @ian-r-rose.

@jacobtomlinson
Copy link
Copy Markdown
Member

Test failure is unrelated.

FAILED distributed/tests/test_client.py::test_reconnect - asyncio.exceptions....

Merging.

@jacobtomlinson jacobtomlinson merged commit a1d2011 into dask:main Aug 19, 2022
crusaderky added a commit to crusaderky/distributed that referenced this pull request Aug 19, 2022
@jrbourbeau jrbourbeau deleted the ipywidgets-8 branch August 19, 2022 15:59
gjoseph92 pushed a commit to gjoseph92/distributed that referenced this pull request Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for ipywidgets 8

4 participants