Comparing the json representation should handle idiosyncracies of python -> json datastructures.
Comparing the json representation should handle idiosyncracies of python -> 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 #1522

ipython/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets