Skip to content

feat(zarr-storage): add a new store API in zarr_storage.experimental - #491

Draft
d-v-b wants to merge 5 commits into
feat/zarr-storage-legacyfrom
feat/zarr-storage-experimental
Draft

d-v-b wants to merge 5 commits into
feat/zarr-storage-legacyfrom
feat/zarr-storage-experimental

Conversation

@d-v-b

@d-v-b d-v-b commented Dec 3, 2026

Copy link
Copy Markdown
Owner

🤖 AI text below 🤖

Add zarr_storage.experimental, the store API meant to succeed zarr_storage.legacy: Store and AsyncStore views over memory, local-filesystem and obstore backends, with the same operations as sync methods and as coroutines, conditional reads and writes, byte-range reads, reads into caller buffers, batches, and contexts that hold thread pools and limits. zarr_storage.experimental.testing has a conformance suite that any backend can run. Any release may change this API.

Stacked on #490, which must merge first; this PR stays a draft until then. Together the two replace #488. This is step 4 of zarr-developers#4682. Nothing in zarr uses this API.

What changed since #488

The code moved from zarr_storage to zarr_storage.experimental, and its tests to tests/experimental. Comparing syntax trees with fce03f9, the last commit of that PR, only these differ besides import paths: Buffer comes from collections.abc, and __version__ stays in zarr_storage. New: tests/experimental/test_package.py, which checks that importing this API imports neither the legacy code nor its dependencies.

  • Python 3.12 or later, for the whole package (it was 3.11).
  • Pyright strict checks this code; the legacy code keeps zarr's mypy settings.
  • ObjectStoreBackend needs the obstore extra (obstore 0.12). The remote extra allows older versions, which work for the legacy stores only.
  • The test session ignores the event loops, sockets and sessions that the legacy tests' libraries leave open, so leak detection is weaker than before for this API's tests.

packages/zarr-storage/DESIGN.md is the contract. The design notes and the review record of the API are in #488 and its comments.

Testing

5222 tests of both APIs pass on macOS with Python 3.12, 3.14 and free-threaded 3.14. mypy, pyright, ruff and mkdocs build --strict are clean. One review of the move found no serious problem; its minor findings are fixed, except that no job here tests the legacy code's obstore 0.5.1 floor, and that leak detection is weaker, as above.

🤖 Generated with Claude Code

d-v-b and others added 2 commits December 3, 2026 13:35
The code of #488 (`Store` and `AsyncStore` views over
capability backends, contexts, locations, the conformance suite), moved from
`zarr_storage` to `zarr_storage.experimental`. Apart from import paths, the
syntax trees equal fce03f9's except that `Buffer` comes from
`collections.abc`, since the package requires Python 3.12, and that
`__version__` stays in `zarr_storage`.

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant