public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/scipy] rawhide: Update to scipy-1.18.0
@ 2026-07-31  5:47 Siteshwar Vashisht
  0 siblings, 0 replies; only message in thread
From: Siteshwar Vashisht @ 2026-07-31  5:47 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/scipy
            Branch : rawhide
            Commit : 679b2ca42cb2e25b81dacda08fd3382e7823e17d
            Author : Siteshwar Vashisht <svashisht@redhat.com>
            Date   : 2026-07-31T02:47:32+02:00
            Stats  : +91/-227 in 6 file(s)
            URL    : https://src.fedoraproject.org/rpms/scipy/c/679b2ca42cb2e25b81dacda08fd3382e7823e17d?branch=rawhide

            Log:
            Update to scipy-1.18.0

Resolves: #2406909

Signed-off-by: Siteshwar Vashisht <svashisht@redhat.com>

---
diff --git a/.gitignore b/.gitignore
index 1c5af42..19a71d0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,3 +46,5 @@ scipy-0.7.2.tar.gz
 /scipy-1.14.1.tar.gz
 /scipy-1.15.3.tar.gz
 /scipy-1.16.2.tar.gz
+/scipy-1.18.0.tar.gz
+/submodules-1.18.0.tar.gz

diff --git a/4bdac888ec.patch b/4bdac888ec.patch
deleted file mode 100644
index f4b709d..0000000
--- a/4bdac888ec.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-From 4bdac888ec4104db9256012ff784a62693b106a1 Mon Sep 17 00:00:00 2001
-From: Pieter Eendebak <pieter.eendebak@gmail.com>
-Date: Fri, 29 Aug 2025 16:39:35 +0200
-Subject: [PATCH] Use reshape instead of setting the shape attribute
-
----
- scipy/datasets/_fetchers.py |  3 +--
- scipy/io/_netcdf.py         |  4 ++--
- scipy/odr/_models.py        | 28 ++++++++++------------------
- scipy/stats/_stats_py.py    |  2 +-
- 4 files changed, 14 insertions(+), 23 deletions(-)
-
-diff --git a/scipy/datasets/_fetchers.py b/scipy/datasets/_fetchers.py
-index 190621e37bec..f6389a0ca5da 100644
---- a/scipy/datasets/_fetchers.py
-+++ b/scipy/datasets/_fetchers.py
-@@ -222,8 +222,7 @@ def face(gray=False):
-     with open(fname, 'rb') as f:
-         rawdata = f.read()
-     face_data = bz2.decompress(rawdata)
--    face = frombuffer(face_data, dtype='uint8')
--    face.shape = (768, 1024, 3)
-+    face = frombuffer(face_data, dtype='uint8').reshape((768, 1024, 3))
-     if gray is True:
-         face = (0.21 * face[:, :, 0] + 0.71 * face[:, :, 1] +
-                 0.07 * face[:, :, 2]).astype('uint8')
-diff --git a/scipy/io/_netcdf.py b/scipy/io/_netcdf.py
-index 14499ccb769f..0aef5d49b11a 100644
---- a/scipy/io/_netcdf.py
-+++ b/scipy/io/_netcdf.py
-@@ -696,13 +696,13 @@ def _read_var_array(self):
-                 a_size = reduce(mul, shape, 1) * size
-                 if self.use_mmap:
-                     data = self._mm_buf[begin_:begin_+a_size].view(dtype=dtype_)
--                    data.shape = shape
-+                    data = data.reshape(shape)
-                 else:
-                     pos = self.fp.tell()
-                     self.fp.seek(begin_)
-                     data = frombuffer(self.fp.read(a_size), dtype=dtype_
-                                       ).copy()
--                    data.shape = shape
-+                    data = data.reshape(shape)
-                     self.fp.seek(pos)
- 
-             # Add variable.
-diff --git a/scipy/odr/_models.py b/scipy/odr/_models.py
-index e0a8d2275dcc..c4ca5b6f442e 100644
---- a/scipy/odr/_models.py
-+++ b/scipy/odr/_models.py
-@@ -9,7 +9,7 @@
- 
- def _lin_fcn(B, x):
-     a, b = B[0], B[1:]
--    b.shape = (b.shape[0], 1)
-+    b = b.reshape((b.shape[0], 1))
- 
-     return a + (x*b).sum(axis=0)
- 
-@@ -17,15 +17,13 @@ def _lin_fcn(B, x):
- def _lin_fjb(B, x):
-     a = np.ones(x.shape[-1], float)
-     res = np.concatenate((a, x.ravel()))
--    res.shape = (B.shape[-1], x.shape[-1])
--    return res
-+    return res.reshape((B.shape[-1], x.shape[-1]))
- 
- 
- def _lin_fjd(B, x):
-     b = B[1:]
-     b = np.repeat(b, (x.shape[-1],)*b.shape[-1], axis=0)
--    b.shape = x.shape
--    return b
-+    return b.reshape(x.shape)
- 
- 
- def _lin_est(data):
-@@ -43,7 +41,7 @@ def _lin_est(data):
- 
- def _poly_fcn(B, x, powers):
-     a, b = B[0], B[1:]
--    b.shape = (b.shape[0], 1)
-+    b = b.reshape((b.shape[0], 1))
- 
-     return a + np.sum(b * np.power(x, powers), axis=0)
- 
-@@ -51,13 +49,12 @@ def _poly_fcn(B, x, powers):
- def _poly_fjacb(B, x, powers):
-     res = np.concatenate((np.ones(x.shape[-1], float),
-                           np.power(x, powers).flat))
--    res.shape = (B.shape[-1], x.shape[-1])
--    return res
-+    return res.reshape((B.shape[-1], x.shape[-1]))
- 
- 
- def _poly_fjacd(B, x, powers):
-     b = B[1:]
--    b.shape = (b.shape[0], 1)
-+    b = b.reshape((b.shape[0], 1))
- 
-     b = b * powers
- 
-@@ -74,8 +71,7 @@ def _exp_fjd(B, x):
- 
- def _exp_fjb(B, x):
-     res = np.concatenate((np.ones(x.shape[-1], float), x * np.exp(B[1] * x)))
--    res.shape = (2, x.shape[-1])
--    return res
-+    return res.reshape((2, x.shape[-1]))
- 
- 
- def _exp_est(data):
-@@ -163,7 +159,7 @@ def polynomial(order):
-         # Scalar.
-         powers = np.arange(1, powers + 1)
- 
--    powers.shape = (len(powers), 1)
-+    powers = powers.reshape((len(powers), 1))
-     len_beta = len(powers) + 1
- 
-     def _poly_est(data, len_beta=len_beta):
-@@ -221,9 +217,7 @@ def _unilin_fjd(B, x):
- 
- def _unilin_fjb(B, x):
-     _ret = np.concatenate((x, np.ones(x.shape, float)))
--    _ret.shape = (2,) + x.shape
--
--    return _ret
-+    return _ret.reshape((2,) + x.shape)
- 
- 
- def _unilin_est(data):
-@@ -240,9 +234,7 @@ def _quad_fjd(B, x):
- 
- def _quad_fjb(B, x):
-     _ret = np.concatenate((x*x, x, np.ones(x.shape, float)))
--    _ret.shape = (3,) + x.shape
--
--    return _ret
-+    return _ret.reshape((3,) + x.shape)
- 
- 
- def _quad_est(data):
-diff --git a/scipy/stats/_stats_py.py b/scipy/stats/_stats_py.py
-index 4762a20e83b1..f76273c65d4e 100644
---- a/scipy/stats/_stats_py.py
-+++ b/scipy/stats/_stats_py.py
-@@ -2073,7 +2073,7 @@ def _compute_qth_percentile(sorted_, per, interpolation_method, axis):
-         weights = array([(j - idx), (idx - i)], float)
-         wshape = [1] * sorted_.ndim
-         wshape[axis] = 2
--        weights.shape = wshape
-+        weights = weights.reshape(wshape)
-         sumval = weights.sum()
- 
-     # Use np.add.reduce (== np.sum but a little faster) to coerce data type

diff --git a/archive-submodules.sh b/archive-submodules.sh
new file mode 100755
index 0000000..3b72f00
--- /dev/null
+++ b/archive-submodules.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+# This script was vibe coded through Claude.
+set -euo pipefail
+
+output="${1:-submodules.tar.gz}"
+
+cd "$(git rev-parse --show-toplevel)"
+
+git submodule update --init --recursive --quiet
+
+paths=()
+while IFS= read -r p; do
+    paths+=("$p")
+done < <(git submodule foreach --quiet --recursive 'echo "$displaypath"')
+
+if [[ ${#paths[@]} -eq 0 ]]; then
+    echo "No submodules found." >&2
+    exit 1
+fi
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT
+
+combined="$tmpdir/combined.tar"
+tar cf "$combined" --files-from /dev/null
+
+for sm_path in "${paths[@]}"; do
+    git -C "$sm_path" archive --prefix="$sm_path/" HEAD > "$tmpdir/sm.tar"
+    tar -Af "$combined" "$tmpdir/sm.tar"
+done
+
+gzip -c "$combined" > "$output"
+echo "Created $output with ${#paths[@]} submodule(s)."

diff --git a/e90159476a.patch b/e90159476a.patch
deleted file mode 100644
index 14ae8c1..0000000
--- a/e90159476a.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From e90159476a2032b73154bdc727629f1cdbdb1064 Mon Sep 17 00:00:00 2001
-From: Pieter Eendebak <pieter.eendebak@gmail.com>
-Date: Fri, 29 Aug 2025 19:22:51 +0200
-Subject: [PATCH] last replacements
-
----
- scipy/io/_netcdf.py          | 4 ++--
- scipy/stats/_multivariate.py | 3 ++-
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/scipy/io/_netcdf.py b/scipy/io/_netcdf.py
-index 0aef5d49b11a..d810c583056c 100644
---- a/scipy/io/_netcdf.py
-+++ b/scipy/io/_netcdf.py
-@@ -720,13 +720,13 @@ def _read_var_array(self):
-             if self.use_mmap:
-                 buf = self._mm_buf[begin:begin+self._recs*self._recsize]
-                 rec_array = buf.view(dtype=dtypes)
--                rec_array.shape = (self._recs,)
-+                rec_array = rec_array.reshape((self._recs,))
-             else:
-                 pos = self.fp.tell()
-                 self.fp.seek(begin)
-                 rec_array = frombuffer(self.fp.read(self._recs*self._recsize),
-                                        dtype=dtypes).copy()
--                rec_array.shape = (self._recs,)
-+                rec_array = rec_array.reshape((self._recs,))
-                 self.fp.seek(pos)
- 
-             for var in rec_vars:
-diff --git a/scipy/stats/_multivariate.py b/scipy/stats/_multivariate.py
-index d36e9ffa4c8f..ee97fe88a2d8 100644
---- a/scipy/stats/_multivariate.py
-+++ b/scipy/stats/_multivariate.py
-@@ -3483,7 +3483,8 @@ def entropy(self, n, p):
- 
-         n = n[..., np.newaxis]
-         new_axes_needed = max(p.ndim, n.ndim) - x.ndim + 1
--        x.shape += (1,)*new_axes_needed
-+        new_shape = x.shape + (1,)*new_axes_needed
-+        x = x.reshape(new_shape)
- 
-         term2 = np.sum(binom.pmf(x, n, p)*gammaln(x+1),
-                        axis=(-1, -1-new_axes_needed))

diff --git a/scipy.spec b/scipy.spec
index 69563d8..52ee970 100644
--- a/scipy.spec
+++ b/scipy.spec
@@ -43,8 +43,8 @@
 
 Summary:    Scientific Tools for Python
 Name:       scipy
-Version:    1.16.2
-Release:    7%{?dist}
+Version:    1.18.0
+Release:    1%{?dist}
 
 # BSD-3-Clause -- whole package except:
 # BSD-2-Clause -- scipy/_lib/_pep440.py
@@ -69,10 +69,9 @@ Release:    7%{?dist}
 License:    BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0 AND Boehm-GC AND Qhull AND LicenseRef-Fedora-Public-Domain
 Url:        https://scipy.org/
 Source0:    https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%{version}.tar.gz
-
-# Fix NumPy 2.5 deprecation of setting .shape on arrays
-Patch:      https://github.com/scipy/scipy/commit/4bdac888ec.patch
-Patch:      https://github.com/scipy/scipy/commit/e90159476a.patch
+# Execute `archive-submodules.sh submodules-{version}.tar.gz` (stored in downstream sources) inside
+# upstream git directory to generate `submodules-{version}.tar.gz`
+Source1:    submodules-%{version}.tar.gz
 
 BuildRequires: %{blaslib}-devel
 BuildRequires: gcc-gfortran, gcc-c++
@@ -113,21 +112,21 @@ Requires:   python3-numpy, python3-f2py
 %if %{with pooch}
 Requires:   python3-pooch
 %endif
-Provides:   bundled(arpack) = 3.9.1
 Provides:   bundled(biasedurn)
-Provides:   bundled(boost-math)
-Provides:   bundled(coin-or-HiGHS) = 1.2
+Provides:   bundled(boost-math) = 1.91.0
+Provides:   bundled(cobyqa) = v1.1.3
+Provides:   bundled(coin-or-HiGHS) = 1.12.0
 Provides:   bundled(direct)
-Provides:   bundled(Faddeeva)
-Provides:   bundled(id)
+Provides:   bundled(duccfft) = 0.40.0
 Provides:   bundled(l-bfgs-b) = 3.0
 Provides:   bundled(LAPJVsp)
-Provides:   bundled(python3-decorator) = 4.0.5
-Provides:   bundled(python3-pep440)
-Provides:   bundled(python3-pypocketfft) = bf2c431c21213b7c5e23c2f542009b0bd3ec1445
-Provides:   bundled(qhull) = 2019.1
-Provides:   bundled(SuperLU) = 5.2.0
-Provides:   bundled(unuran) = 1.8.1
+Provides:   bundled(pyprima)
+Provides:   bundled(python3-array-api-compat) = 1.14
+Provides:   bundled(python3-array-api-extra) = 0.10.1
+Provides:   bundled(qhull) = 2020.2
+Provides:   bundled(SuperLU) = 6.0.1
+Provides:   bundled(unuran) = 1.9.0
+
 %description -n python3-scipy %_description
 
 %if %{with doc}
@@ -148,21 +147,19 @@ Scipy test files
 %endif
 
 %prep
-%autosetup -p1 -n %{name}-%{version}%{?rcver}
+%autosetup -p1 -n %{name}-%{version}%{?rcver} -a 1
 
 %if %{without pythran}
 # Remove pythran dependency if not explicitly required
 sed -i '/pythran/d' pyproject.toml
 %else
 # Relax it otherwise
-sed -i 's/pythran>=0.14.0,<0.18.0/pythran>=0.14.0/' pyproject.toml
+sed -i 's/pythran>=0.18.1,<0.19.0/pythran>=0.18.1/' pyproject.toml
 %endif
 %if %{without pooch}
 sed -i '/pooch/d' pyproject.toml
 %endif
 
-rm $(grep -rl '/\* Generated by Cython') PKG-INFO
-
 # Do not do benchmarking, coverage, or timeout testing for RPM builds
 sed -Ei '/^[[:blank:]]*"(asv|pytest-cov|pytest-timeout)"/d' pyproject.toml
 
@@ -175,7 +172,7 @@ sed -i '/^[[:blank:]]*"pytest-xdist"/d' pyproject.toml
 %endif
 
 # Loosen the upper bound on numpy
-sed -i "/numpy/s/,<2\.3//" pyproject.toml
+sed -i "/numpy/s/,<2\.8//" pyproject.toml
 
 # Loosen the lower bound on array-api-strict
 sed -i "/array-api-strict/s/>=2\.3\.1/>=2/" pyproject.toml
@@ -226,27 +223,35 @@ export PYTEST_ADDOPTS="-k '$SKIP_ALL'"
 %ifarch aarch64
 # TestConstructUtils::test_concatenate_int32_overflow is flaky on aarch64
 export PYTEST_ADDOPTS="-k '$SKIP_ALL and \
-not test_concatenate_int32_overflow'"
+not (TestQR and test_smoke_economic and complex64) and \
+not test_concatenate_int32_overflow and \
+not test_reproduction_NaN_on_input_points'"
 %endif
 
 %ifarch s390x
 # https://bugzilla.redhat.com/show_bug.cgi?id=1959353
 export PYTEST_ADDOPTS="-k '$SKIP_ALL and \
+not (TestBisplrep and test_regression_1310) and \
+not test_smoke_economic and \
+not test_reproduction_NaN_on_input_points and \
+not test_matlab_string_opaque and \
 not test_distance_transform_cdt05'"
 %endif
 
 %ifarch x86_64
-%if 0%{?rhel}
 # test_minimize_constrained started failing on ELN without any direct changes to scipy
 export PYTEST_ADDOPTS="-k '$SKIP_ALL and \
+not (TestQR and test_smoke_economic and complex64) and \
+not (test_convergence and rand-sym-pd-F-tfqmr) and \
+not (test_precond_dummy and rand-sym-pd-F-tfqmr) and \
 not test_gh7799 and \
 not test_minimize_constrained'"
 %endif
-%endif
 
 %ifarch i686
 # https://github.com/scipy/scipy/issues/17213
 export PYTEST_ADDOPTS="-k '$SKIP_ALL and \
+not test_argmax_overflow and \
 not test_examples and \
 not test_shifts and \
 not test_svdp and \
@@ -256,7 +261,26 @@ not test_threadpoolctl and \
 not test_gh11389 and \
 not test_gh18123 and \
 not test_gh_17782_segfault and \
-not test_svd_gesdd_nofegfault'"
+not test_svd_gesdd_nofegfault and \
+not (TestCSRNonCanonicalMatrix and test_sparse_format_conversions) and \
+not (TestHilbert2 and test_hilbert2_types) and \
+not (TestIRFFTSingle and test_random_real) and \
+not (TestIRFFTSingle and test_size_accuracy_small) and \
+not TestOverwrite and \
+not (TestQR and test_smoke_economic and complex64) and \
+not (test_convergence and rand-sym-pd-F-tfqmr) and \
+not (test_precond_dummy and rand-sym-pd-F-tfqmr) and \
+not test_invalid_dimensions and \
+not (TestFftnSingle and test_size_accuracy) and \
+not test_cython and \
+not (TestFftn and test_definition) and \
+not test_fftpack_import and \
+not test_cumulative_simpson_against_simpson_with_default_dx and \
+not test_n_argument_real and \
+not test_backend_call and \
+not test_djbfft and \
+not (test_discrete_basic and binom)' \
+--ignore=scipy/fft/_duccfft/tests/test_real_transforms.py"
 %endif
 
 %ifarch riscv64
@@ -303,6 +327,10 @@ popd
 %endif
 
 %changelog
+* Wed Jul 29 2026 Siteshwar Vashisht <svashisht@redhat.com> - 1.18.0-1
+- Update to scipy-1.18.0
+  Resolves: #2406909
+
 * Wed Jul 22 2026 Python Maint <python-maint@redhat.com> - 1.16.2-7
 - Rebuilt for Python 3.15.0b4 ABI change
 

diff --git a/sources b/sources
index e85156b..df7fd41 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-SHA512 (scipy-1.16.2.tar.gz) = 6b5c1ab6236af5d40850f8b77f8d47494dda9bccf814908ba306b4b3710359d18eb0dd880c05dc4f334cc298d0a2d54d271d5cd5b519190fcfba58524b1d8dce
+SHA512 (scipy-1.18.0.tar.gz) = facd6ba4eb6f3306bc6fe585c2e3e876649fd0050506ccc3d89eada308845d8756755c6de32b573c2d2a4705d469c3df6bffd9d2b448f83b2d98386eaefc6b88
+SHA512 (submodules-1.18.0.tar.gz) = c3b07125fe84b627790e29cf3c72d0d038bb23af50e68b3b4bff6f7a18defc32307740562864a91050c08929745dfed3ee661a0b3c3b3360294be51717a33a54

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-31  5:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-31  5:47 [rpms/scipy] rawhide: Update to scipy-1.18.0 Siteshwar Vashisht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox