Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-scipy for openSUSE:Factory 
checked in at 2023-01-28 19:59:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-scipy (Old)
 and      /work/SRC/openSUSE:Factory/.python-scipy.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-scipy"

Sat Jan 28 19:59:45 2023 rev:61 rq:1059146 version:1.10.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-scipy/python-scipy.changes        
2022-12-25 15:14:43.197327919 +0100
+++ /work/SRC/openSUSE:Factory/.python-scipy.new.32243/python-scipy.changes     
2023-01-28 20:07:52.461947736 +0100
@@ -1,0 +2,30 @@
+Mon Jan 16 22:06:27 UTC 2023 - Ben Greiner <c...@bnavigator.de>
+
+- Highlights of the 1.10.0 release
+  * A new dedicated datasets submodule (scipy.datasets) has been
+    added, and is now preferred over usage of scipy.misc for
+    dataset retrieval.
+  * A new scipy.interpolate.make_smoothing_spline function was
+    added. This function constructs a smoothing cubic spline from
+    noisy data, using the generalized cross-validation (GCV)
+    criterion to find the tradeoff between smoothness and proximity
+    to data points.
+  * scipy.stats has three new distributions, two new hypothesis
+    tests, three new sample statistics, a class for greater control
+    over calculations involving covariance matrices, and many other
+    enhancements.
+- Add scipy-pr17717-ro-interpn.patch gh#scipy/scipy#17717
+  * Fixes gh#spacetelescope/gwcs#433
+- Provide scipy-datasets.tar.gz for pooch cache and tests without
+  needing to download during test time.
+
+-------------------------------------------------------------------
+Wed Jan 11 07:35:47 UTC 2023 - Guillaume GARDET <guillaume.gar...@opensuse.org>
+
+- Update to version 1.10.0
+- Drop upstream pacthes:
+  * fix-tests.patch
+  * fix-tests-pytest72.patch
+  * scipy-pr17467-no-np.int0.patch
+
+-------------------------------------------------------------------

Old:
----
  fix-tests-pytest72.patch
  fix-tests.patch
  scipy-1.9.3.tar.gz
  scipy-pr17467-no-np.int0.patch

New:
----
  scipy-1.10.0.tar.gz
  scipy-datasets.tar.gz
  scipy-pr17717-ro-interpn.patch

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

Other differences:
------------------
++++++ python-scipy.spec ++++++
--- /var/tmp/diff_new_pack.4CVZqH/_old  2023-01-28 20:07:53.877955550 +0100
+++ /var/tmp/diff_new_pack.4CVZqH/_new  2023-01-28 20:07:53.881955572 +0100
@@ -1,7 +1,7 @@
 #
 # spec file
 #
-# 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
@@ -17,7 +17,7 @@
 
 
 %global flavor @BUILD_FLAVOR@%{nil}
-%define _ver 1_9_3
+%define _ver 1_10_0
 %define shortname scipy
 %define pname python-%{shortname}
 %define hpc_upcase_trans_hyph() %(echo %{**} | tr [a-z] [A-Z] | tr '-' '_')
@@ -92,19 +92,17 @@
 # TODO explore debundling Boost for standard and hpc
 
 Name:           %{package_name}
-Version:        1.9.3
+Version:        1.10.0
 Release:        0
 Summary:        Scientific Tools for Python
 License:        BSD-3-Clause AND LGPL-2.0-or-later AND BSL-1.0
 Group:          Development/Libraries/Python
 URL:            https://www.scipy.org
 Source0:        
https://files.pythonhosted.org/packages/source/s/scipy/scipy-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM gh#scipy/scipy#16926#issuecomment-1287507634
-Patch1:         fix-tests.patch
-# PATCH-FIX-UPSTREAM fix-tests-pytest72.patch gh#scipy/scipy#17296
-Patch2:         fix-tests-pytest72.patch
-# PATCH-FIX-UPSTREAM scipy-pr17467-no-np.int0.patch gh#scipy/scipy#17467
-Patch3:         scipy-pr17467-no-np.int0.patch
+# Create with pooch: `python3 scipy-%{version}/scipy/datasets/_download_all.py 
scipy-datasets/scipy-data; tar czf scipy-datasets.tar.gz scipy-datasets`
+Source1:        scipy-datasets.tar.gz
+# PATCH-FIX-UPSTREAM scipy-pr17717-ro-interpn.patch gh#scipy/scipy#17717
+Patch0:         
https://github.com/scipy/scipy/pull/17717.patch#/scipy-pr17717-ro-interpn.patch
 BuildRequires:  %{python_module Cython >= 0.29.32}
 BuildRequires:  %{python_module devel >= 3.8}
 BuildRequires:  %{python_module meson-python >= 0.9.0}
@@ -118,6 +116,7 @@
 BuildRequires:  pkg-config
 BuildRequires:  python-rpm-macros >= 20220911
 %if %{with test}
+BuildRequires:  %{python_module pooch}
 BuildRequires:  %{python_module pytest-timeout}
 BuildRequires:  %{python_module pytest-xdist}
 BuildRequires:  %{python_module pytest}
@@ -130,6 +129,7 @@
 BuildRequires:  gcc-fortran
 Requires:       python-numpy >= 1.18.5
 Requires:       python-pybind11 >= 2.4.3
+Suggests:       python-pooch
  %if %{with openblas}
 BuildRequires:  openblas-devel
  %else
@@ -157,8 +157,9 @@
 %{?with_hpc:%{hpc_python_master_package -L -a }}
 
 %prep
-%autosetup -p1 -n scipy-%{version}
+%autosetup -p1 -n scipy-%{version} -a1
 sed -i '1{/env python/d}' scipy/sparse/linalg/_isolve/tests/test_gcrotmk.py
+chmod a-x scipy/stats/tests/test_distributions.py
 
 %ifarch i586
 # Limit double floating point precision for x87, triggered by GCC 12.
@@ -167,7 +168,7 @@
 
 %if !%{with openblas}
 # Edit the options file until we have a way to provide options to meson-python 
from command line or environment
-# https://github.com/FFY00/meson-python/pull/122
+# https://github.com/mesonbuild/meson-python/issues/230 
https://github.com/mesonbuild/meson-python/issues/235
 sed -i "s/option('blas', type: 'string', value: 'openblas'/option('blas', 
type: 'string', value: 'blas'/" meson_options.txt
 sed -i "s/option('lapack', type: 'string', value: 'openblas'/option('lapack', 
type: 'string', value: 'lapack'/" meson_options.txt
 %endif
@@ -239,6 +240,8 @@
 
 %if %{with test}
 %check
+# pooch cache (extracted SOURCE1)
+export XDG_CACHE_HOME=$PWD/scipy-datasets
 # (occasional) precision errors
 donttest="(TestLinprogIPSpecific and test_solver_select)"
 donttest+=" or test_gh12922"
@@ -248,6 +251,9 @@
 donttest+=" or (test_rotation and test_align_vectors_single_vector)"
 donttest+=" or (test_lobpcg and test_tolerance_float32)"
 donttest+=" or (test_iterative and test_maxiter_worsening)"
+%ifarch %ix86
+donttest+=" or (test_solvers and test_solve_generalized_discrete_are)"
+%endif
 # fails on big endian
 donttest+=" or (TestNoData and test_nodata)"
 # oom

++++++ scipy-1.9.3.tar.gz -> scipy-1.10.0.tar.gz ++++++
/work/SRC/openSUSE:Factory/python-scipy/scipy-1.9.3.tar.gz 
/work/SRC/openSUSE:Factory/.python-scipy.new.32243/scipy-1.10.0.tar.gz differ: 
char 5, line 1

++++++ scipy-pr17717-ro-interpn.patch ++++++
>From 590d84e445c515d38cb52b2392c1735255c6bde5 Mon Sep 17 00:00:00 2001
From: Brett <brettgra...@gmail.com>
Date: Wed, 4 Jan 2023 11:53:30 -0500
Subject: [PATCH] BUG: allow readonly input to interpolate.interpn

Add readonly input test for interpolate.interpn and
RegularGridInterpolator.
Enforce c-contiguity for grid
Add more const declarations to support more read-only arguments
Check that values are writeable to work around lack of
const fused types in cython<0.29.33
Check for native endianess when selecting fast path in interpolate

Closes #17716

TST: expand interpolate tests
---
 scipy/interpolate/_rgi.py           |  8 +++--
 scipy/interpolate/_rgi_cython.pyx   |  8 +++--
 scipy/interpolate/tests/test_rgi.py | 55 +++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+), 5 deletions(-)

diff --git a/scipy/interpolate/_rgi.py b/scipy/interpolate/_rgi.py
index 37c76bb0b71..ec9f55f76aa 100644
--- a/scipy/interpolate/_rgi.py
+++ b/scipy/interpolate/_rgi.py
@@ -23,11 +23,12 @@ def _check_points(points):
                 # input is descending, so make it ascending
                 descending_dimensions.append(i)
                 p = np.flip(p)
-                p = np.ascontiguousarray(p)
             else:
                 raise ValueError(
                     "The points in dimension %d must be strictly "
                     "ascending or descending" % i)
+        # see https://github.com/scipy/scipy/issues/17716
+        p = np.ascontiguousarray(p)
         grid.append(p)
     return tuple(grid), tuple(descending_dimensions)
 
@@ -330,7 +331,10 @@ def __call__(self, xi, method=None):
         if method == "linear":
             indices, norm_distances = self._find_indices(xi.T)
             if (ndim == 2 and hasattr(self.values, 'dtype') and
-                    self.values.ndim == 2):
+                    self.values.ndim == 2 and self.values.flags.writeable and
+                    self.values.dtype.byteorder == '='):
+                # until cython supports const fused types, the fast path
+                # cannot support non-writeable values
                 # a fast path
                 out = np.empty(indices.shape[1], dtype=self.values.dtype)
                 result = evaluate_linear_2d(self.values,
diff --git a/scipy/interpolate/_rgi_cython.pyx 
b/scipy/interpolate/_rgi_cython.pyx
index 22d4a2eda7a..71e030664b7 100644
--- a/scipy/interpolate/_rgi_cython.pyx
+++ b/scipy/interpolate/_rgi_cython.pyx
@@ -17,7 +17,7 @@ np.import_array()
 @cython.boundscheck(False)
 @cython.initializedcheck(False)
 def evaluate_linear_2d(double_or_complex[:, :] values, # cannot declare as ::1
-                       long[:, :] indices,             # unless prior
+                       const long[:, :] indices,       # unless prior
                        double[:, :] norm_distances,    # np.ascontiguousarray
                        tuple grid not None,
                        double_or_complex[:] out):
@@ -72,11 +72,13 @@ def evaluate_linear_2d(double_or_complex[:, :] values, # 
cannot declare as ::1
 @cython.boundscheck(False)
 @cython.cdivision(True)
 @cython.initializedcheck(False)
-def find_indices(tuple grid not None, double[:, :] xi):
+def find_indices(tuple grid not None, const double[:, :] xi):
+    # const is required for xi above in case xi is read-only
     cdef:
         long i, j, grid_i_size
         double denom, value
-        double[::1] grid_i
+        # const is required in case grid is read-only
+        const double[::1] grid_i
 
         # Axes to iterate over
         long I = xi.shape[0]
diff --git a/scipy/interpolate/tests/test_rgi.py 
b/scipy/interpolate/tests/test_rgi.py
index 89e3aae51cd..0b8436de060 100644
--- a/scipy/interpolate/tests/test_rgi.py
+++ b/scipy/interpolate/tests/test_rgi.py
@@ -939,3 +939,58 @@ def test_invalid_xi_dimensions(self):
                "RegularGridInterpolator has dimension 1")
         with assert_raises(ValueError, match=msg):
             interpn(points, values, xi)
+
+    def test_readonly_grid(self):
+        # https://github.com/scipy/scipy/issues/17716
+        x = np.linspace(0, 4, 5)
+        y = np.linspace(0, 5, 6)
+        z = np.linspace(0, 6, 7)
+        points = (x, y, z)
+        values = np.ones((5, 6, 7))
+        point = np.array([2.21, 3.12, 1.15])
+        for d in points:
+            d.flags.writeable = False
+        values.flags.writeable = False
+        point.flags.writeable = False
+        interpn(points, values, point)
+        RegularGridInterpolator(points, values)(point)
+
+    def test_2d_readonly_grid(self):
+        # https://github.com/scipy/scipy/issues/17716
+        # test special 2d case
+        x = np.linspace(0, 4, 5)
+        y = np.linspace(0, 5, 6)
+        points = (x, y)
+        values = np.ones((5, 6))
+        point = np.array([2.21, 3.12])
+        for d in points:
+            d.flags.writeable = False
+        values.flags.writeable = False
+        point.flags.writeable = False
+        interpn(points, values, point)
+        RegularGridInterpolator(points, values)(point)
+
+    def test_non_c_contiguous_grid(self):
+        # https://github.com/scipy/scipy/issues/17716
+        x = np.linspace(0, 4, 5)
+        x = np.vstack((x, np.empty_like(x))).T.copy()[:, 0]
+        assert not x.flags.c_contiguous
+        y = np.linspace(0, 5, 6)
+        z = np.linspace(0, 6, 7)
+        points = (x, y, z)
+        values = np.ones((5, 6, 7))
+        point = np.array([2.21, 3.12, 1.15])
+        interpn(points, values, point)
+        RegularGridInterpolator(points, values)(point)
+
+    @pytest.mark.parametrize("dtype", ['>f8', '<f8'])
+    def test_endianness(self, dtype):
+        # https://github.com/scipy/scipy/issues/17716
+        # test special 2d case
+        x = np.linspace(0, 4, 5, dtype=dtype)
+        y = np.linspace(0, 5, 6, dtype=dtype)
+        points = (x, y)
+        values = np.ones((5, 6), dtype=dtype)
+        point = np.array([2.21, 3.12], dtype=dtype)
+        interpn(points, values, point)
+        RegularGridInterpolator(points, values)(point)

Reply via email to