On 10/1/23 23:51, Edward Betts wrote:
Thanks for the patch.
I've applied it and uploaded a new version of hickle.
Now this new version seems to fail (its test[1]) against the older version of
h5py (in testing)
and is unable to migrate along with it. In principle a versioned depends could
be
added against h5py to fix this but this is IMHO _not_ needed since this was
just a test
specific thing that chokes.
This was an oversight on my end.
I've attached a new patch which should get it passing with both the older and
newer versions
of h5py. Could you please consider to apply it and upload if it looks OK to you?
Could you as well push your commits to salsa?
[1]:
https://ci.debian.net/data/autopkgtest/testing/amd64/h/hickle/38396024/log.gz
Thanks,
Nilesh
--- a/hickle/tests/test_01_hickle_helpers.py
+++ b/hickle/tests/test_01_hickle_helpers.py
@@ -121,16 +121,17 @@
# load data and try to directly modify 'type' and 'base_type' Attributes
# which will fail cause hdf5 file is opened for read only
h5_node = h5_data['somedata']
- with pytest.raises(OSError):
+ pytest_errclass = KeyError if h5py.__version__ >= '3.9.0' else OSError
+ with pytest.raises(pytest_errclass):
try:
h5_node.attrs['type'] = pickle.dumps(list)
except RuntimeError as re:
- raise OSError(re).with_traceback(re.__traceback__)
- with pytest.raises(OSError):
+ raise pytest_errclass(re).with_traceback(re.__traceback__)
+ with pytest.raises(pytest_errclass):
try:
h5_node.attrs['base_type'] = b'list'
except RuntimeError as re:
- raise OSError(re).with_traceback(re.__traceback__)
+ raise pytest_errclass(re).with_traceback(re.__traceback__)
# verify that 'type' expands to tuple before running
# the remaining tests