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 b177906e..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") @@ -494,13 +493,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"""