Open
Description
Zarr version
2.16.1
Numcodecs version
0.12.1
Python Version
3.12
Operating System
Fedora Rawhide/40
Installation
from source
Description
Fedora 40 is transitioning to using zlib-ng; this provides an ABI-compatible replacement that is parallel and optimized for current processors. Unfortunately, it also produces results which may be different (but as I understand it, of similar compression ratio). This causes several tests to fail, as they compute the exact hex digest of the result.
I'm not sure if I should just start skipping these tests, or try and update them in some way.
Steps to reproduce
On a Fedora Rawhide or Fedora 40 container, install dependencies, then install zarr and run tests:
$ podman run --rm -it fedora:rawhide
# dnf install -y python3-devel 'python3dist(bsddb3)' 'python3dist(fsspec)' 'python3dist(h5py)' 'python3dist(lmdb)' 'python3dist(msgpack)' 'python3dist(pytest)' 'python3dist(asciitree)' 'python3dist(numcodecs)' 'python3dist(fasteners)'
# pip install zarr
# pytest --pyargs zarr
Additional output
Failing test output
___________________________ TestArray.test_hexdigest ___________________________
self = <zarr.tests.test_core.TestArray object at 0x7f3308a50860>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['063b02ff8d9...05027a07d209'] == ['063b02ff8d9...05027a07d209']
E At index 3 diff: '14470724dca6c1837edddedc490571b6a7f270bc' != 'f3f04f0e30844739d34ef8a9eee6c949a47840b8'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError
__________________ TestArrayWithDirectoryStore.test_hexdigest __________________
self = <zarr.tests.test_core.TestArrayWithDirectoryStore object at 0x7f3308a78770>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['063b02ff8d9...05027a07d209'] == ['063b02ff8d9...05027a07d209']
E At index 3 diff: '14470724dca6c1837edddedc490571b6a7f270bc' != 'f3f04f0e30844739d34ef8a9eee6c949a47840b8'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError
_______________ TestArrayWithNestedDirectoryStore.test_hexdigest _______________
self = <zarr.tests.test_core.TestArrayWithNestedDirectoryStore object at 0x7f3308a889e0>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['d174aa384e6...7759ca725551'] == ['d174aa384e6...7759ca725551']
E At index 3 diff: '719a88b34e362ff65df30e8f8810c1146ab72bc1' != '42d9c96e60ed22346c4671bc5bec32a2078ce25c'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError
_____________________ TestArrayWithN5Store.test_hexdigest ______________________
self = <zarr.tests.test_core.TestArrayWithN5Store object at 0x7f33091e81d0>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['8811a77d54c...d30c80dfc372'] == ['8811a77d54c...d30c80dfc372']
E At index 3 diff: '568f9f837e4b682a3819cb122988e2eebeb6572b' != 'ea7d9e80211679291141840b111775b088e51480'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError
____________________ TestArrayWithN5FSStore.test_hexdigest _____________________
self = <zarr.tests.test_core.TestArrayWithN5FSStore object at 0x7f33092104a0>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['8811a77d54c...d30c80dfc372'] == ['8811a77d54c...d30c80dfc372']
E At index 3 diff: '568f9f837e4b682a3819cb122988e2eebeb6572b' != 'ea7d9e80211679291141840b111775b088e51480'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError
_____________________ TestArrayWithDBMStore.test_hexdigest _____________________
self = <zarr.tests.test_core.TestArrayWithDBMStore object at 0x7f3309213da0>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['063b02ff8d9...05027a07d209'] == ['063b02ff8d9...05027a07d209']
E At index 3 diff: '14470724dca6c1837edddedc490571b6a7f270bc' != 'f3f04f0e30844739d34ef8a9eee6c949a47840b8'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError
________________ TestArrayWithDBMStoreBerkeleyDB.test_hexdigest ________________
self = <zarr.tests.test_core.TestArrayWithDBMStoreBerkeleyDB object at 0x7f33091da1b0>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['063b02ff8d9...05027a07d209'] == ['063b02ff8d9...05027a07d209']
E At index 3 diff: '14470724dca6c1837edddedc490571b6a7f270bc' != 'f3f04f0e30844739d34ef8a9eee6c949a47840b8'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError
____________________ TestArrayWithLMDBStore.test_hexdigest _____________________
self = <zarr.tests.test_core.TestArrayWithLMDBStore object at 0x7f3308ab2e70>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['063b02ff8d9...05027a07d209'] == ['063b02ff8d9...05027a07d209']
E At index 3 diff: '14470724dca6c1837edddedc490571b6a7f270bc' != 'f3f04f0e30844739d34ef8a9eee6c949a47840b8'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError
________________ TestArrayWithLMDBStoreNoBuffers.test_hexdigest ________________
self = <zarr.tests.test_core.TestArrayWithLMDBStoreNoBuffers object at 0x7f3308a96c00>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['063b02ff8d9...05027a07d209'] == ['063b02ff8d9...05027a07d209']
E At index 3 diff: '14470724dca6c1837edddedc490571b6a7f270bc' != 'f3f04f0e30844739d34ef8a9eee6c949a47840b8'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError
___________________ TestArrayWithSQLiteStore.test_hexdigest ____________________
self = <zarr.tests.test_core.TestArrayWithSQLiteStore object at 0x7f3308a94da0>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['063b02ff8d9...05027a07d209'] == ['063b02ff8d9...05027a07d209']
E At index 3 diff: '14470724dca6c1837edddedc490571b6a7f270bc' != 'f3f04f0e30844739d34ef8a9eee6c949a47840b8'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError
_____________________ TestArrayWithFilters.test_hexdigest ______________________
self = <zarr.tests.test_core.TestArrayWithFilters object at 0x7f3309090110>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['b80367c5599...d33bce52501e'] == ['b80367c5599...d33bce52501e']
E At index 3 diff: 'c649ad229bc5720258b934ea958570c2f354c2eb' != '1e053b6ad7dc58de7b1f5dad7fb45851f6b7b3ee'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError
__________________ TestArrayWithCustomMapping.test_hexdigest ___________________
self = <zarr.tests.test_core.TestArrayWithCustomMapping object at 0x7f3309092060>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['063b02ff8d9...05027a07d209'] == ['063b02ff8d9...05027a07d209']
E At index 3 diff: '14470724dca6c1837edddedc490571b6a7f270bc' != 'f3f04f0e30844739d34ef8a9eee6c949a47840b8'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError
________________ TestArrayWithCustomMapping.test_nbytes_stored _________________
self = <zarr.tests.test_core.TestArrayWithCustomMapping object at 0x7f3309091820>
def test_nbytes_stored(self):
z = self.create_array(shape=1000, chunks=100)
assert 245 == z.nbytes_stored
z[:] = 42
> assert 515 == z.nbytes_stored
E assert 515 == 485
E + where 485 = <zarr.core.Array (1000,) float64>.nbytes_stored
zarr/tests/test_core.py:2315: AssertionError
_______________________ TestArrayNoCache.test_hexdigest ________________________
self = <zarr.tests.test_core.TestArrayNoCache object at 0x7f3309093b90>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['063b02ff8d9...05027a07d209'] == ['063b02ff8d9...05027a07d209']
E At index 3 diff: '14470724dca6c1837edddedc490571b6a7f270bc' != 'f3f04f0e30844739d34ef8a9eee6c949a47840b8'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError
____________________ TestArrayWithStoreCache.test_hexdigest ____________________
self = <zarr.tests.test_core.TestArrayWithStoreCache object at 0x7f3309151280>
def test_hexdigest(self):
found = []
# Check basic 1-D array
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with different type
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
found.append(z.hexdigest())
z.store.close()
# Check basic 2-D array
z = self.create_array(
shape=(
20,
35,
),
chunks=10,
dtype="<i4",
)
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with some data
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z[200:400] = np.arange(200, 400, dtype="i4")
found.append(z.hexdigest())
z.store.close()
# Check basic 1-D array with attributes
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
z.attrs["foo"] = "bar"
found.append(z.hexdigest())
z.store.close()
> assert self.expected() == found
E AssertionError: assert ['063b02ff8d9...05027a07d209'] == ['063b02ff8d9...05027a07d209']
E At index 3 diff: '14470724dca6c1837edddedc490571b6a7f270bc' != 'f3f04f0e30844739d34ef8a9eee6c949a47840b8'
E Use -v to get more diff
zarr/tests/test_core.py:667: AssertionError