From a520a26fafb2505ef1a708780a8e58bd1b58979d Mon Sep 17 00:00:00 2001 From: MARCHAND MANON Date: Fri, 15 Mar 2024 16:45:31 +0100 Subject: [PATCH] fix: get_metadata deprecated since traitlets 4.1 see https://github.com/ipython/traitlets/blob/cb672eb5ba235fdfee6407bd7f1b1985de934e7c/traitlets/traitlets.py#L833 --- python/ipywidgets/ipywidgets/widgets/widget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ipywidgets/ipywidgets/widgets/widget.py b/python/ipywidgets/ipywidgets/widgets/widget.py index 2dc674097d..cb05ff2bbb 100644 --- a/python/ipywidgets/ipywidgets/widgets/widget.py +++ b/python/ipywidgets/ipywidgets/widgets/widget.py @@ -684,7 +684,7 @@ def add_traits(self, **traits): """Dynamically add trait attributes to the Widget.""" super().add_traits(**traits) for name, trait in traits.items(): - if trait.get_metadata('sync'): + if 'sync' in trait.metadata: self.keys.append(name) self.send_state(name)