RELEASE_NOTES: add breaking change data_changed signature

This commit is contained in:
Simon Renblad 2023-07-12 12:31:03 +08:00 committed by Sébastien Bourdeauducq
parent 068a2d1663
commit 9f8bb6445f

View File

@ -48,6 +48,26 @@ Breaking changes:
* ``SimpleApplet`` now calls widget constructors with an additional ``ctl`` parameter for control * ``SimpleApplet`` now calls widget constructors with an additional ``ctl`` parameter for control
operations, which includes dataset operations. It can be ignored if not needed. For an example usage, operations, which includes dataset operations. It can be ignored if not needed. For an example usage,
refer to the ``big_number.py`` applet. refer to the ``big_number.py`` applet.
* ``SimpleApplet`` and ``TitleApplet`` now call ``data_changed`` with additional parameters. Wrapped widgets
should refactor the function signature as seen below:
::
# SimpleApplet
def data_changed(self, value, metadata, persist, mods)
# SimpleApplet (old version)
def data_changed(self, data, mods)
# TitleApplet
def data_changed(self, value, metadata, persist, mods, title)
# TitleApplet (old version)
def data_changed(self, data, mods, title)
Old syntax should be replaced with the form shown on the right.
::
data[key][0] ==> persist[key]
data[key][1] ==> value[key]
data[key][2] ==> metadata[key]
ARTIQ-7 ARTIQ-7