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

Comparing the json representation should handle idiosyncracies of python->json datastructures #1523

Merged
merged 1 commit into from
Jul 19, 2017

Conversation

jasongrout
Copy link
Member

The output widget is suffering from a problem in how we check for what messages to send back to the server. In the default from_json at

, we just return the object. However, since outputs are in a tuple, but the incoming json is a list, the comparison at
and to_json(value, self) == self._property_lock[key]):
always fails. The problem is that the roundtrip from python -> json -> python changes tuples into lists. Basically, this problem means that the output is cleared and reset multiple times, causing flicker.

See #1522

CC @maartenbreddels

…hon -> json datastructures.

The output widget is suffering from a problem in how we check for what messages to send back to the server. In the default from_json at https://github.com/jupyter-widgets/ipywidgets/blob/4ffa003d18e54d14d1c33dcc71b4282f7fa60996/ipywidgets/widgets/widget.py#L650, we just return the object. However, since outputs are in a tuple, but the incoming json is a list, the comparison at https://github.com/jupyter-widgets/ipywidgets/blob/4ffa003d18e54d14d1c33dcc71b4282f7fa60996/ipywidgets/widgets/widget.py#L599 always fails. The problem is that the roundtrip from python -> json -> python changes tuples into lists. Basically, this problem means that the output is cleared and reset multiple times, causing flicker.

See jupyter-widgets#1522
@jasongrout jasongrout modified the milestones: 7.0, 5.x Jul 19, 2017
@jasongrout jasongrout merged commit f688a4f into jupyter-widgets:master Jul 19, 2017
@github-actions github-actions bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 12, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant