2 Commits

Author SHA256 Message Date
614e184999 Accepting request 1302354 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1302354
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blosc?expand=0&rev=26
2025-09-02 15:59:28 +00:00
bbb8a0dbe2 - Add the use-frombuffer.patch: It fix the building due to binary mode of fromstring being removed
(gh#Blosc/python-blosc##342)
- Add the use-frombuffer.patch: It fix the building due to binary mode of fromstring being removed
  (gh#Blosc/python-blosc#342)
- Add the use-frombuffer.patch: It fix the building due to binary mode of fromstring being removed
  (gh#Blosc/python-blosc#342)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-blosc?expand=0&rev=33
2025-09-02 08:45:58 +00:00
3 changed files with 32 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Sep 2 08:42:43 UTC 2025 - Marius Grossu <marius.grossu@suse.com>
- Add the use-frombuffer.patch: It fix the building due to binary mode of fromstring being removed
(gh#Blosc/python-blosc#342)
-------------------------------------------------------------------
Sat Jul 12 11:41:45 UTC 2025 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-blosc
#
# 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
@@ -25,6 +25,8 @@ License: MIT
Group: Development/Languages/Python
URL: https://github.com/Blosc/python-blosc
Source: https://files.pythonhosted.org/packages/source/b/blosc/blosc-%{version}.tar.gz
# PATCH-FIX-UPSTREAM use-frombuffer.patch gh#Blosc/python-blosc#342
Patch0: use-frombuffer.patch
BuildRequires: %{python_module devel >= 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module scikit-build >= 0.11.1}

23
use-frombuffer.patch Normal file
View File

@@ -0,0 +1,23 @@
From c858a7805946d4002dbd8ab4a2f7416b7a0aefdb Mon Sep 17 00:00:00 2001
From: Marius Grossu <mgrossu@localhost.localdomain>
Date: Mon, 1 Sep 2025 12:56:34 +0200
Subject: [PATCH] Change fromstring to frombuffer because the binary mode was
removed
---
blosc/toplevel.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blosc/toplevel.py b/blosc/toplevel.py
index 4d2d413..3ef2327 100644
--- a/blosc/toplevel.py
+++ b/blosc/toplevel.py
@@ -513,7 +513,7 @@ def compress_ptr(address, items, typesize=8, clevel=9, shuffle=blosc.SHUFFLE,
>>> c = blosc.compress_ptr(np_array.__array_interface__['data'][0], \
items, np_array.dtype.itemsize)
>>> d = blosc.decompress(c)
- >>> np_ans = numpy.fromstring(d, dtype=np_array.dtype)
+ >>> np_ans = numpy.frombuffer(d, dtype=np_array.dtype)
>>> bool((np_array == np_ans).all())
True