Source: hickle Version: 5.0.2-2 Severity: serious Tags: sid bookworm User: debian...@lists.debian.org Usertags: needs-update User: debian-pyt...@lists.debian.org Usertags: python3.11 Control: affects -1 src:python3-defaults
Dear maintainer(s),We are in the transition of adding python3.11 as a supported Python version [0]. With a recent upload of python3-defaults the autopkgtest of hickle fails in testing when that autopkgtest is run with the binary packages of python3-defaults from unstable. It passes when run with only packages from testing. In tabular form:
pass fail python3-defaults from testing 3.10.6-3 hickle from testing 5.0.2-2 all others from testing from testing I copied some of the output at the bottom of this report.Currently this regression is blocking the migration of python3-defaults to testing [1]. https://docs.python.org/3/whatsnew/3.11.html lists what's new in Python3.11, it may help to identify what needs to be updated.
More information about this bug and the reason for filing it can be found on https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation Paul [0] https://bugs.debian.org/1021984 [1] https://qa.debian.org/excuses.php?package=python3-defaults https://ci.debian.net/data/autopkgtest/testing/amd64/h/hickle/28726232/log.gz=================================== FAILURES =================================== ____________________________ test_H5NodeFilterProxy ____________________________
h5_data = <HDF5 file "hickle_helpers_test_H5NodeFilterProxy.hdf5" (mode r)> def test_H5NodeFilterProxy(h5_data): """tests H5NodeFilterProxy class. This class allows to temporarily rewrite attributes of h5py.Group and h5py.Dataset nodes before being loaded by
hickle._load method. """# 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): try: h5_node.attrs['type'] = pickle.dumps(list) except RuntimeError as re: raise OSError(re).with_traceback(re.__traceback__) with pytest.raises(OSError): try: h5_node.attrs['base_type'] = b'list' except RuntimeError as re: raise OSError(re).with_traceback(re.__traceback__) # verify that 'type' expands to tuple before running # the remaining tests object_type = pickle.loads(h5_node.attrs['type']) assert object_type is tuple assert object_type(h5_node[()].tolist()) == dummy_data # Wrap node by H5NodeFilterProxy and rerun the above tests # again. This time modifying Attributes shall be possible. h5_node = H5NodeFilterProxy(h5_node) h5_node.attrs['type'] = pickle.dumps(list) h5_node.attrs['base_type'] = b'list' object_type = pickle.loads(h5_node.attrs['type']) assert object_type is list # test proper pass through of item and attribute access # to wrapped h5py.Group or h5py.Dataset object respective assert object_type(h5_node[()].tolist()) == list(dummy_data) assert h5_node.shape == np.array(dummy_data).shapewith pytest.raises(AttributeError,match = r"can't\s+set\s+attribute"):
h5_node.dtype = np.float32
/tmp/autopkgtest-lxc.j_xof7x9/downtmp/build.8IK/src/hickle/tests/test_01_hickle_helpers.py:154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hickle.helpers.H5NodeFilterProxy object at 0x7f5593aeb050> name = 'dtype', value = <class 'numpy.float32'> def __setattr__(self, name, value):# if wrapped _h5_node and attrs shall be set store value on local attributes
# otherwise pass on to wrapped _h5_node if name in {'_h5_node'}: super().__setattr__(name, value) return if name in {'attrs'}: # pragma: no cover raise AttributeError('attribute is read-only') _h5_node = super().__getattribute__('_h5_node')
setattr(_h5_node, name, value)
E AttributeError: property 'dtype' of 'Dataset' object has no setter/tmp/autopkgtest-lxc.j_xof7x9/downtmp/build.8IK/src/hickle/helpers.py:180: AttributeError
During handling of the above exception, another exception occurred: h5_data = <HDF5 file "hickle_helpers_test_H5NodeFilterProxy.hdf5" (mode r)> def test_H5NodeFilterProxy(h5_data): """tests H5NodeFilterProxy class. This class allows to temporarily rewrite attributes of h5py.Group and h5py.Dataset nodes before being loaded by
hickle._load method. """# 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): try: h5_node.attrs['type'] = pickle.dumps(list) except RuntimeError as re: raise OSError(re).with_traceback(re.__traceback__) with pytest.raises(OSError): try: h5_node.attrs['base_type'] = b'list' except RuntimeError as re: raise OSError(re).with_traceback(re.__traceback__) # verify that 'type' expands to tuple before running # the remaining tests object_type = pickle.loads(h5_node.attrs['type']) assert object_type is tuple assert object_type(h5_node[()].tolist()) == dummy_data # Wrap node by H5NodeFilterProxy and rerun the above tests # again. This time modifying Attributes shall be possible. h5_node = H5NodeFilterProxy(h5_node) h5_node.attrs['type'] = pickle.dumps(list) h5_node.attrs['base_type'] = b'list' object_type = pickle.loads(h5_node.attrs['type']) assert object_type is list # test proper pass through of item and attribute access # to wrapped h5py.Group or h5py.Dataset object respective assert object_type(h5_node[()].tolist()) == list(dummy_data) assert h5_node.shape == np.array(dummy_data).shape
E AssertionError: Regex pattern "can't\\s+set\\s+attribute" does not match "property 'dtype' of 'Dataset' object has no setter".with pytest.raises(AttributeError,match = r"can't\s+set\s+attribute"):
/tmp/autopkgtest-lxc.j_xof7x9/downtmp/build.8IK/src/hickle/tests/test_01_hickle_helpers.py:153: AssertionError =========================== short test summary info ============================ FAILED hickle/tests/test_01_hickle_helpers.py::test_H5NodeFilterProxy - Asser... !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!! ========================= 1 failed, 2 passed in 0.99s ==========================
autopkgtest [17:14:14]: test run-tests
OpenPGP_signature
Description: OpenPGP digital signature