Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pyUSID for openSUSE:Factory 
checked in at 2025-11-25 15:54:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyUSID (Old)
 and      /work/SRC/openSUSE:Factory/.python-pyUSID.new.14147 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pyUSID"

Tue Nov 25 15:54:14 2025 rev:15 rq:1319855 version:0.0.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyUSID/python-pyUSID.changes      
2025-04-22 17:29:19.089690425 +0200
+++ /work/SRC/openSUSE:Factory/.python-pyUSID.new.14147/python-pyUSID.changes   
2025-11-25 15:55:43.253750831 +0100
@@ -1,0 +2,7 @@
+Tue Nov 25 03:07:18 UTC 2025 - Steve Kowalik <[email protected]>
+
+- Add patch support-numpy-2.patch:
+  * Support numpy 2 changes.
+- Remove upper bound on numpy.
+
+-------------------------------------------------------------------

New:
----
  support-numpy-2.patch

----------(New B)----------
  New:
- Add patch support-numpy-2.patch:
  * Support numpy 2 changes.
----------(New E)----------

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

Other differences:
------------------
++++++ python-pyUSID.spec ++++++
--- /var/tmp/diff_new_pack.CNtSGW/_old  2025-11-25 15:55:43.965780839 +0100
+++ /var/tmp/diff_new_pack.CNtSGW/_new  2025-11-25 15:55:43.965780839 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pyUSID
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2025 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,6 @@
 
 
 %{?sle15_python_module_pythons}
-%global skip_python39 1
 Name:           python-pyUSID
 Version:        0.0.12
 Release:        0
@@ -25,6 +24,8 @@
 License:        MIT
 URL:            https://pycroscopy.github.io/pyUSID/
 Source0:        
https://github.com/pycroscopy/pyUSID/archive/v%{version}.tar.gz#/pyUSID-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM 
gh#pycroscopy/pyUSID#f95d64233643777f6dab92dceda672c9d20033a4
+Patch0:         support-numpy-2.patch
 BuildRequires:  %{python_module Pillow}
 BuildRequires:  %{python_module cytoolz}
 BuildRequires:  %{python_module dask >= 0.10}
@@ -33,7 +34,7 @@
 BuildRequires:  %{python_module ipywidgets >= 5.2.2}
 BuildRequires:  %{python_module joblib >= 0.11.0}
 BuildRequires:  %{python_module matplotlib >= 2.0.0}
-BuildRequires:  %{python_module numpy >= 1.20 with %python-numpy < 2}
+BuildRequires:  %{python_module numpy >= 1.20}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module psutil}
 BuildRequires:  %{python_module pytest}
@@ -47,10 +48,10 @@
 Requires:       python-cytoolz
 Requires:       python-dask >= 0.10
 Requires:       python-h5py >= 2.6.0
+Requires:       python-numpy >= 1.20
 Requires:       python-psutil
 Requires:       python-sidpy >= 0.10
 Requires:       python-toolz
-Requires:       (python-numpy >= 1.20 with python-numpy < 2)
 BuildArch:      noarch
 %python_subpackages
 

++++++ support-numpy-2.patch ++++++
>From f95d64233643777f6dab92dceda672c9d20033a4 Mon Sep 17 00:00:00 2001
From: Rama Vasudevan <[email protected]>
Date: Fri, 7 Mar 2025 16:47:03 -0500
Subject: [PATCH] numpy 2 compatibility changes

---
 pyUSID/io/hdf_utils/model.py  | 4 ++--
 pyUSID/io/hdf_utils/simple.py | 2 +-
 tests/io/test_dimension.py    | 5 ++++-
 tests/io/test_usi_dataset.py  | 5 +++--
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/pyUSID/io/hdf_utils/model.py b/pyUSID/io/hdf_utils/model.py
index 218354ba..961541f8 100644
--- a/pyUSID/io/hdf_utils/model.py
+++ b/pyUSID/io/hdf_utils/model.py
@@ -402,11 +402,11 @@ def reshape_from_n_dims(data_n_dim, h5_pos=None, 
h5_spec=None, verbose=False):
         ds_pos = make_indices_matrix(pos_dims, is_position=True)
 
     elif h5_spec is not None and h5_pos is not None:
-        if ds_pos.shape[0] * ds_spec.shape[1] != np.product(data_n_dim.shape):
+        if ds_pos.shape[0] * ds_spec.shape[1] != np.prod(data_n_dim.shape):
             raise ValueError('The product ({}) of the number of positions ({}) 
and spectroscopic ({}) observations is '
                              'not equal to the product ({}) of the data shape 
({})'
                              '.'.format(ds_pos.shape[0] * ds_spec.shape[1], 
ds_pos.shape[0], ds_spec.shape[1],
-                                        np.product(data_n_dim.shape), 
data_n_dim.shape))
+                                        np.prod(data_n_dim.shape), 
data_n_dim.shape))
 
         if ds_pos.shape[1] + ds_spec.shape[0] != data_n_dim.ndim:
             # This may mean that the dummy position or spectroscopic axes has 
been squeezed out!
diff --git a/pyUSID/io/hdf_utils/simple.py b/pyUSID/io/hdf_utils/simple.py
index a1d06cfd..993a432d 100644
--- a/pyUSID/io/hdf_utils/simple.py
+++ b/pyUSID/io/hdf_utils/simple.py
@@ -352,7 +352,7 @@ def validate_dims_against_main(main_shape, dims, 
is_spectroscopic=True):
 
     # TODO: This is where the dimension type will need to be taken into account
     lhs = main_shape[main_dim]
-    rhs = np.product([len(x.values) for x in dims])
+    rhs = np.prod([len(x.values) for x in dims])
     if lhs != rhs:
         raise ValueError(dim_category +
                          ' dimensions in main data of size: {} do not match '
diff --git a/tests/io/test_dimension.py b/tests/io/test_dimension.py
index 944ba6f0..233f5079 100644
--- a/tests/io/test_dimension.py
+++ b/tests/io/test_dimension.py
@@ -50,6 +50,8 @@ def test_repr(self):
         expected = '{}: {} ({}) mode:{} : {}'.format(name, quantity, units, 
descriptor.mode, values)
         self.assertEqual(actual, expected)
 
+    """
+    The following tests fail due to a change in how numpy 2.2 handles these 
two arrays in a bitwise comparison
     def test_equality(self):
         name = 'Bias'
         units = 'V'
@@ -62,6 +64,7 @@ def test_inequality(self):
         name = 'Bias'
         units = 'V'
         values = [0, 1, 2, 3]
+    
 
         left = dimension.Dimension(name, units, values)
         right = dimension.Dimension(name, units, [0, 1, 2, 4])
@@ -83,7 +86,7 @@ def test_inequality(self):
                                      mode=dimension.DimType.DEPENDENT)
         right = dimension.Dimension(name, units, values)
         self.assertFalse(left == right)
-
+    """
     def test_invalid_mode(self):
         with self.assertRaises(TypeError):
             _ = dimension.Dimension('Name', 'units', 5, mode='Incomplete')
diff --git a/tests/io/test_usi_dataset.py b/tests/io/test_usi_dataset.py
index 5f0fe729..0a82eb5e 100644
--- a/tests/io/test_usi_dataset.py
+++ b/tests/io/test_usi_dataset.py
@@ -669,8 +669,9 @@ def __validate_dim_list(self, expected, actual):
         self.assertIsInstance(expected, list)
         self.assertIsInstance(expected, list)
         self.assertEqual(len(expected), len(actual))
-        for left, right in zip(expected, actual):
-            self.assertEqual(left, right)
+        #for left, right in zip(expected, actual):
+        #    self.assertEqual(left, right) #this had to be removed due to 
numpy 2.2 change in how it compares array#  
+        #TODO: Need to rewrite teh assert Equal to split up the array part so 
as to avoid this issue.
 
     def base(self, slice_dict, pos_exp, spec_exp, verbose=False):
         with h5py.File(test_h5_file_path, mode='r') as h5_f:

Reply via email to