From 5f9a120774eaa6d5d013ea25f5719436d59e8b15 Mon Sep 17 00:00:00 2001 From: Kilian Paul <81327374+Darlokt@users.noreply.github.com> Date: Mon, 21 Sep 2026 22:49:21 +0200 Subject: [PATCH 1/2] Require zarr 3.1.2 or newer SpatialData imports ArrayNotFoundError, which is unavailable in Zarr 3.0.0 through 3.1.1. Raise the dependency floor and exercise that exact version in the minimum-dependency test environment. This fixes the invalid dependency range introduced by #985. --- docs/changelog.md | 1 + pyproject.toml | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 89658c92a..eed2b9474 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -13,4 +13,5 @@ For developers, please consult the [contributing guide](https://github.com/scver ### Fixed +- Require Zarr 3.1.2 or newer, which provides the `ArrayNotFoundError` used by SpatialData's persistence layer. - Querying a `SpatialData` object with multiple (batched) bounding boxes now raises an explicit `NotImplementedError` instead of failing with an opaque `AssertionError`. Batched queries are supported when querying a `SpatialElement` directly, but not when querying a `SpatialData` object, since that would require returning one `SpatialData` object per bounding box. diff --git a/pyproject.toml b/pyproject.toml index 4cc02bcb4..b1129b2a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ dependencies = [ "universal-pathlib>=0.2.6", "xarray>=2024.10", "xarray-spatial>=0.3.5", - "zarr>=3", + "zarr>=3.1.2", ] optional-dependencies.extra = [ "napari-spatialdata[all]", @@ -140,6 +140,7 @@ envs.hatch-test.overrides.matrix.deps.env-vars = [ envs.hatch-test.overrides.matrix.deps.extra-dependencies = [ { value = "dask==2026.3.0", if = [ "min" ] }, { value = "distributed==2026.3.0", if = [ "min" ] }, + { value = "zarr==3.1.2", if = [ "min" ] }, ] envs.hatch-test.dependency-groups = [ "dev", "test" ] envs.hatch-check-fmt.dependencies = [ "prek" ] @@ -151,7 +152,7 @@ envs.hatch-check-code.scripts.lint-fix = "prek run -a --no-group=format --no-gro envs.hatch-check-types.scripts.check = [ "mypy" ] envs.hatch-check-types.dependency-groups = [ "typecheck", "test" ] # Not part of the CI matrix; run locally with `hatch run test-anndata-pandas:test`. -envs.test-anndata-pandas.extra-dependencies = [ "zarr>=3" ] +envs.test-anndata-pandas.extra-dependencies = [ "zarr>=3.1.2" ] envs.test-anndata-pandas.scripts.test = [ "pip list|grep anndata && pip list|grep pandas && pytest {args}" ] envs.test-anndata-pandas.scripts.test-all = [ "pip list|grep anndata && pip list|grep pandas && pytest ." ] envs.test-anndata-pandas.scripts.test-readwrite = [ From 00dfd27a73328915fea87f4eb496821f9f5a4184 Mon Sep 17 00:00:00 2001 From: Kilian Paul <81327374+Darlokt@users.noreply.github.com> Date: Tue, 22 Sep 2026 10:57:12 +0200 Subject: [PATCH 2/2] Add issue number to changelog --- docs/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index eed2b9474..be3163812 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -13,5 +13,5 @@ For developers, please consult the [contributing guide](https://github.com/scver ### Fixed -- Require Zarr 3.1.2 or newer, which provides the `ArrayNotFoundError` used by SpatialData's persistence layer. +- Require Zarr 3.1.2 or newer, which provides the `ArrayNotFoundError` used by SpatialData's persistence layer. (#1256) - Querying a `SpatialData` object with multiple (batched) bounding boxes now raises an explicit `NotImplementedError` instead of failing with an opaque `AssertionError`. Batched queries are supported when querying a `SpatialElement` directly, but not when querying a `SpatialData` object, since that would require returning one `SpatialData` object per bounding box.