Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support ipywidgets>8 by passing tuples to dropdown instead of dict #797

Merged
merged 5 commits into from
Jan 1, 2023

Conversation

devstein
Copy link
Collaborator

@devstein devstein commented Jan 1, 2023

Description

Closes #769
Relates to jupyter-widgets/ipywidgets#2679

ipywidgets dropped supported for map types in 8.0.0 because drop downs should be ordered. This PR passes an ordered list of tuples to all of the references to Dropdown instead of a dict.

Note: dict support was re-added in jupyter-widgets/ipywidgets#3557, but still think it makes sense to move to an ordered list of tuples

Checklist

  • Wrote a description of my changes above
  • Formatted my code with black
  • Added a bullet point for my changes to the top of the CHANGELOG.md file
  • Added or modified unit tests to reflect my changes
  • Manually tested with a notebook
  • If adding a feature, there is an example notebook and/or documentation in the README.md file

@devstein devstein self-assigned this Jan 1, 2023
@jasongrout
Copy link

jasongrout commented Jan 1, 2023

FYI, ipywidgets 8.0.2 adds back in support for dicts since now dicts are ordered, though it isn't advertised in the docs: jupyter-widgets/ipywidgets#3557

@jasongrout
Copy link

FYI, ipywidgets 8.0.2 adds back in support for dicts since now dicts are ordered, though it isn't advertised in the docs: jupyter-widgets/ipywidgets#3557

This is noted in #769 (comment) too.

However, I think these changes look good to me, and an improvement.

Copy link

@jasongrout jasongrout left a comment

Choose a reason for hiding this comment

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

LGTM

@devstein
Copy link
Collaborator Author

devstein commented Jan 1, 2023

Thanks for reviewing @jasongrout! I saw that dict support was re-added, but thought the ordered list of tuples is clearer, so made the change.

@devstein devstein merged commit c67c5e1 into master Jan 1, 2023
@devstein devstein deleted the devstein/ipywidget-8-support branch January 1, 2023 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Ipywidgets package update (8.0.1) broke latest Sparkmagic 0.20.0
2 participants