public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-blosc2] rawhide: Fix NumPy 2.5 deprecation of setting .shape on arrays
@ 2026-07-23 16:14
0 siblings, 0 replies; only message in thread
From: @ 2026-07-23 16:14 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-blosc2
Branch : rawhide
Commit : cd598e7b39a4964cafa8141ee44dd3f3a42c3e79
Author : Miro Hrončok <miro@hroncok.cz>
Date : 2026-07-23T18:03:54+02:00
Stats : +28/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-blosc2/c/cd598e7b39a4964cafa8141ee44dd3f3a42c3e79?branch=rawhide
Log:
Fix NumPy 2.5 deprecation of setting .shape on arrays
---
diff --git a/d5300ab0.patch b/d5300ab0.patch
new file mode 100644
index 0000000..60b63c7
--- /dev/null
+++ b/d5300ab0.patch
@@ -0,0 +1,25 @@
+From d5300ab0702224312d2f2ecb8749fef2e6a061a6 Mon Sep 17 00:00:00 2001
+From: Francesc Alted <francesc@blosc.org>
+Date: Wed, 24 Jun 2026 12:03:14 +0200
+Subject: [PATCH] Adjust for deprecations in NumPy 2.5
+
+---
+ src/blosc2/lazyexpr.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/blosc2/lazyexpr.py b/src/blosc2/lazyexpr.py
+index 1758f6916..5653beff6 100644
+--- a/src/blosc2/lazyexpr.py
++++ b/src/blosc2/lazyexpr.py
+@@ -4073,8 +4073,9 @@ def _compute_expr(self, item, kwargs):
+ return out
+ arr = lazy_expr[key]
+ if builtins.sum(mask) > 0:
+- # Correct shape to adjust to NumPy convention
+- arr.shape = tuple(arr.shape[i] for i in range(len(mask)) if not mask[i])
++ # Correct shape to adjust to NumPy convention.
++ new_shape = tuple(arr.shape[i] for i in range(len(mask)) if not mask[i])
++ arr = np.reshape(arr, new_shape)
+ return arr
+
+ return chunked_eval(lazy_expr.expression, lazy_expr.operands, item, **kwargs)
diff --git a/python-blosc2.spec b/python-blosc2.spec
index ca5412b..fbc16f0 100644
--- a/python-blosc2.spec
+++ b/python-blosc2.spec
@@ -11,6 +11,9 @@ BuildRequires: gcc-g++
BuildRequires: blosc2-devel >= 2.21.0
BuildRequires: tomcli
+# Fix NumPy 2.5 deprecation of setting .shape on arrays
+Patch: https://github.com/Blosc/python-blosc2/commit/d5300ab0.patch
+
ExcludeArch: %{ix86}
%global _description %{expand:
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-23 16:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-23 16:14 [rpms/python-blosc2] rawhide: Fix NumPy 2.5 deprecation of setting .shape on arrays
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox