From 9f8bb6445ff1956f5605bff42ef59dcd2baf8b89 Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Wed, 12 Jul 2023 12:31:03 +0800 Subject: [PATCH] RELEASE_NOTES: add breaking change data_changed signature --- RELEASE_NOTES.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index 93a36612a..242a917fa 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -48,6 +48,26 @@ Breaking changes: * ``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, 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