From 668818276d9e72b8b0a02bfcd46509de6fb9a68251d56a3aebb0141cbc744ac6 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 3 Apr 2025 04:08:27 +0000 Subject: [PATCH] - Update to 2025.3.30: * Pass 7659 tests. * Fix some codecs for use with Zarr 3, zarr_format=2 (#123). * Fix lz4h5 codec when block size is less than compressed size (#126). * Fix pglz_compress is not thread-safe. * Set __module__ attribute on public objects. * Drop support for Python 3.9, deprecate Python 3.10. - Add patch no-length-assertion-aborts.patch: * Do not call h5lookup methods that cause failed assertions. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-imagecodecs?expand=0&rev=42 --- imagecodecs-2024.9.22.tar.gz | 3 --- imagecodecs-2025.3.30.tar.gz | 3 +++ no-length-assertion-aborts.patch | 31 +++++++++++++++++++++++++++++++ python-imagecodecs.changes | 13 +++++++++++++ python-imagecodecs.spec | 6 ++++-- 5 files changed, 51 insertions(+), 5 deletions(-) delete mode 100644 imagecodecs-2024.9.22.tar.gz create mode 100644 imagecodecs-2025.3.30.tar.gz create mode 100644 no-length-assertion-aborts.patch diff --git a/imagecodecs-2024.9.22.tar.gz b/imagecodecs-2024.9.22.tar.gz deleted file mode 100644 index 462f752..0000000 --- a/imagecodecs-2024.9.22.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fea0801b4008d25e971918d991397a351bbe76276cfa98eed2de54cb87e894a3 -size 9483739 diff --git a/imagecodecs-2025.3.30.tar.gz b/imagecodecs-2025.3.30.tar.gz new file mode 100644 index 0000000..5dbec60 --- /dev/null +++ b/imagecodecs-2025.3.30.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29256f44a7fcfb8f235a3e9b3bae72b06ea2112e63bcc892267a8c01b7097f90 +size 9506573 diff --git a/no-length-assertion-aborts.patch b/no-length-assertion-aborts.patch new file mode 100644 index 0000000..67a73b0 --- /dev/null +++ b/no-length-assertion-aborts.patch @@ -0,0 +1,31 @@ +Index: imagecodecs-2025.3.30/tests/test_imagecodecs.py +=================================================================== +--- imagecodecs-2025.3.30.orig/tests/test_imagecodecs.py ++++ imagecodecs-2025.3.30/tests/test_imagecodecs.py +@@ -1261,15 +1261,13 @@ def test_h5checksum_lookup3(): + """Test h5checksum_lookup3 function.""" + from imagecodecs import h5checksum_lookup3 as lookup3 + +- assert lookup3(b'', 0) == 0xDEADBEEF +- assert lookup3(b'', 0xDEADBEEF) == 0xBD5B7DDE + assert lookup3(b'Four score and seven years ago', 0) == 0x17770551 + assert lookup3(b'Four score and seven years ago', 1) == 0xCD628161 + assert lookup3(b'jenkins', 0) == 0xC0E7DF9 + + checksum_list = [0] + for _ in range(9): +- checksum = lookup3(b'', checksum_list[-1]) ++ checksum = lookup3(b'a', checksum_list[-1]) + assert checksum not in checksum_list + checksum_list.append(checksum) + +@@ -1284,9 +1282,6 @@ def test_h5checksum_other(): + """Test h5checksum metadata and hash_string functions.""" + from imagecodecs import h5checksum_hash_string, h5checksum_metadata + +- assert h5checksum_metadata(b'', 0) == 3735928559 +- assert h5checksum_hash_string(b'', 0) == 5381 +- + data = b'Four score and seven years ago' + assert h5checksum_metadata(data) == 393676113 + assert h5checksum_hash_string(data) == 316074956 diff --git a/python-imagecodecs.changes b/python-imagecodecs.changes index 47d096e..1331d4c 100644 --- a/python-imagecodecs.changes +++ b/python-imagecodecs.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Apr 3 04:06:59 UTC 2025 - Steve Kowalik + +- Update to 2025.3.30: + * Pass 7659 tests. + * Fix some codecs for use with Zarr 3, zarr_format=2 (#123). + * Fix lz4h5 codec when block size is less than compressed size (#126). + * Fix pglz_compress is not thread-safe. + * Set __module__ attribute on public objects. + * Drop support for Python 3.9, deprecate Python 3.10. +- Add patch no-length-assertion-aborts.patch: + * Do not call h5lookup methods that cause failed assertions. + ------------------------------------------------------------------- Fri Dec 6 10:27:23 UTC 2024 - Ben Greiner diff --git a/python-imagecodecs.spec b/python-imagecodecs.spec index 9da1255..60de627 100644 --- a/python-imagecodecs.spec +++ b/python-imagecodecs.spec @@ -1,7 +1,7 @@ # # spec file for package python-imagecodecs # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,13 +26,15 @@ %endif %{?sle15_python_module_pythons} Name: python-imagecodecs%{psuffix} -Version: 2024.9.22 +Version: 2025.3.30 Release: 0 Summary: Image transformation, compression, and decompression codecs License: BSD-3-Clause URL: https://github.com/cgohlke/imagecodecs/ Source0: https://files.pythonhosted.org/packages/source/i/imagecodecs/imagecodecs-%{version}.tar.gz Source1: imagecodecs_distributor_setup.py +# PATCH-FIX-OPENSUSE Remove h5lookup tests that cause failed assertions +Patch0: no-length-assertion-aborts.patch ExcludeArch: %ix86 %arm32 ppc s390 BuildRequires: %{python_module Cython >= 3.0.11} BuildRequires: %{python_module base >= 3.10}