From a936ea8d4c92da82b0e4fe42d4052681c625b7a9 Mon Sep 17 00:00:00 2001 From: Thomas VINCENT Date: Fri, 26 Jun 2026 09:33:46 +0200 Subject: [PATCH 1/2] Enable blosc/blosc2 tests with strings for hdf5 >= 2.1 --- src/hdf5plugin/test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/hdf5plugin/test.py b/src/hdf5plugin/test.py index b177906e..21c00fa8 100644 --- a/src/hdf5plugin/test.py +++ b/src/hdf5plugin/test.py @@ -494,13 +494,17 @@ def _test_strings( self.assertEqual(len(filters), 1) self.assertEqual(filters[0][0], hdf5plugin.FILTERS[filter_name]) - @unittest.skip(reason="segfault (#364)") + @unittest.skipIf( + h5py.version.hdf5_version_tuple < (2, 1, 0), "hdf5 v2.1.0 required" + ) @unittest.skipUnless(should_test("blosc"), "Blosc filter not available") def testStringsBlosc(self): """Strings write/read test with blosc filter plugin""" self._test_strings("blosc") # Default options - @unittest.skip(reason="segfault (#364)") + @unittest.skipIf( + h5py.version.hdf5_version_tuple < (2, 1, 0), "hdf5 v2.1.0 required" + ) @unittest.skipUnless(should_test("blosc2"), "Blosc filter not available") def testStringsBlosc2(self): """Strings write/read test with blosc2 filter plugin""" From 96305df30dde14e052065ea357a6c0a1f8a01d48 Mon Sep 17 00:00:00 2001 From: Thomas VINCENT Date: Fri, 26 Jun 2026 09:34:45 +0200 Subject: [PATCH 2/2] remove usage a `packaging`: not a dependency but was used in embedded tests --- pyproject.toml | 1 - src/hdf5plugin/test.py | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 79084fd9..62030d2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,6 @@ doc = [ "sphinx_rtd_theme", ] test = [ - "packaging", "numpy<2 ; python_version == '3.9'", "blosc2>=2.5.1", "blosc2-grok>=0.2.2", diff --git a/src/hdf5plugin/test.py b/src/hdf5plugin/test.py index 21c00fa8..bc4d5786 100644 --- a/src/hdf5plugin/test.py +++ b/src/hdf5plugin/test.py @@ -34,7 +34,6 @@ from typing import Any, cast import numpy -from packaging.version import parse as parse_version import h5py import hdf5plugin @@ -435,8 +434,8 @@ def setUp(self): numpy.array(["test", "strings", "ascii"] * N, dtype="S"), numpy.array([b"test", b"strings", b"binary"] * N, dtype="O"), ] - has_h5py_314 = parse_version(h5py.__version__) >= parse_version("3.14") - has_numpy_2 = parse_version(numpy.__version__) >= parse_version("2.0") + has_h5py_314 = h5py.version.version_tuple >= (3, 14) + has_numpy_2 = numpy.__version__.startswith("2.") if has_h5py_314 and has_numpy_2: self.string_arrays.append( numpy.array(["test", "strings", "Crème brûlée"] * N, dtype="T")