Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-ipydatawidgets for 
openSUSE:Factory checked in at 2023-02-19 19:33:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ipydatawidgets (Old)
 and      /work/SRC/openSUSE:Factory/.python-ipydatawidgets.new.22824 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ipydatawidgets"

Sun Feb 19 19:33:27 2023 rev:9 rq:1066643 version:unknown

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-ipydatawidgets/python-ipydatawidgets.changes  
    2022-08-29 09:42:32.623737995 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-ipydatawidgets.new.22824/python-ipydatawidgets.changes
   2023-02-19 19:33:28.252779074 +0100
@@ -1,0 +2,7 @@
+Sun Feb 19 16:46:14 UTC 2023 - Ben Greiner <c...@bnavigator.de>
+
+- Add ipydatawidgets-pr56-traitlets-fix.patch
+  * gh#ipydatawidgets/pull#56
+  * Fixes gh#ipydatawidgets/pull#52
+
+-------------------------------------------------------------------

New:
----
  ipydatawidgets-pr56-traitlets-fix.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-ipydatawidgets.spec ++++++
--- /var/tmp/diff_new_pack.AgUruX/_old  2023-02-19 19:33:28.720782095 +0100
+++ /var/tmp/diff_new_pack.AgUruX/_new  2023-02-19 19:33:28.724782121 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-ipydatawidgets
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,7 +26,9 @@
 License:        BSD-3-Clause
 Group:          Development/Languages/Python
 URL:            https://github.com/vidartf/ipydatawidgets
-Source:         
https://files.pythonhosted.org/packages/py2.py3/i/ipydatawidgets/ipydatawidgets-%{mainver}-py2.py3-none-any.whl
+Source0:        
https://files.pythonhosted.org/packages/py2.py3/i/ipydatawidgets/ipydatawidgets-%{mainver}-py2.py3-none-any.whl
+# PATCH-FIX-UPSTREAM ipydatawidgets-pr56-traitlets-fix.patch 
gh#ipydatawidgets/pull#56
+Patch0:         ipydatawidgets-pr56-traitlets-fix.patch
 BuildRequires:  %{python_module base >= 3.7}
 BuildRequires:  %{python_module ipywidgets >= 7.0.0}
 BuildRequires:  %{python_module numpy}
@@ -90,14 +92,19 @@
 %setup -q -T -c
 
 %build
-# Not Needed
+# Not needed: we must use the prebundled jsfiles from the published wheel
 
 %install
 %pyproject_install %{SOURCE0}
 %{jupyter_move_config}
-%python_expand find %{buildroot}%{$python_sitelib}/ipydatawidgets/ -type f 
-name "*.py" -exec sed -i 's/\r$//' {} +
-%python_expand find %{buildroot}%{$python_sitelib}/ipydatawidgets/ -type f 
-name "*.py" -exec sed -i -e '/^#!\//, 1d' {} +
-%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%{python_expand pushd %{buildroot}%{$python_sitelib}
+find ipydatawidgets/ -type f -name "*.py" -exec sed -i 's/\r$//' {} +
+find ipydatawidgets/ -type f -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} +
+patch --no-backup-if-mismatch -p1 < %{PATCH0}
+%{$python_compile}
+%fdupes %{buildroot}%{$python_sitelib}
+popd
+}
 %fdupes %{buildroot}%{_jupyter_prefix}
 cp 
%{buildroot}%{python3_sitelib}/ipydatawidgets-%{mainver}.dist-info/LICENSE.txt .
 


++++++ ipydatawidgets-pr56-traitlets-fix.patch ++++++
>From 584036b7f1b2cf86ccc7261ac50ed5015b143fe1 Mon Sep 17 00:00:00 2001
From: Vidar Tonaas Fauske <510760+vida...@users.noreply.github.com>
Date: Fri, 17 Feb 2023 23:03:19 +0000
Subject: [PATCH] Fix tests + instance_init for DataUnion

---
 ipydatawidgets/ndarray/union.py      | 4 ++++
 ipydatawidgets/tests/test_widgets.py | 8 ++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ipydatawidgets/ndarray/union.py b/ipydatawidgets/ndarray/union.py
index b7f0a3f..9c6a2d3 100644
--- a/ipydatawidgets/ndarray/union.py
+++ b/ipydatawidgets/ndarray/union.py
@@ -55,6 +55,10 @@ def set(self, obj, value):
             # comparison above returns something other than True/False
             obj._notify_trait(self.name, old_value, new_value)
 
+    def subclass_init(self, cls):
+        cls._instance_inits.append(self.instance_init)
+        return super().subclass_init(cls)
+
     def instance_init(self, inst):
         inst.observe(self._on_instance_value_change, self.name)
 
diff --git a/ipydatawidgets/tests/test_widgets.py 
b/ipydatawidgets/tests/test_widgets.py
index c6cd813..4fd1127 100644
--- a/ipydatawidgets/tests/test_widgets.py
+++ b/ipydatawidgets/tests/test_widgets.py
@@ -24,8 +24,12 @@ def test_datawidget_creation_blank():
 def test_datawidget_creation_blank_comm(mock_comm):
     # The mock comm delays serialization, so error is avoided
     # (the array serialization of undefined cause error)
-    w = NDArrayWidget(comm=mock_comm)
-    assert w.array is Undefined
+    try:
+        w = NDArrayWidget(comm=mock_comm)
+    except TraitError as e:
+        assert 'Cannot serialize undefined array' in str(e)
+    else:
+        assert w.array is Undefined
 
 
 def test_datawidget_creation():

Reply via email to