Closed
Labels
bugPotential issues with the zarr-python libraryPotential issues with the zarr-python library
Description
Zarr version
v3.1.3
Numcodecs version
N/A
Python Version
3.11.11
Operating System
Linux
Installation
uv
Description
LoggingStore, LatencyStore and CacheStore all don't support with_read_only.
This is a pain to work with. Particularly with xarray, which defaults to needing a readonly store.
Steps to reproduce
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "zarr@git+https://github.com/zarr-developers/zarr-python.git@main",
# "xarray",
# ]
# ///
#
from zarr.storage import LocalStore, LoggingStore
import xarray as xr
store = LocalStore(root="tmp", read_only=False)
store = LoggingStore(store)
dataset = xr.open_dataset(store, engine="zarr", mode="w") # Works
dataset = xr.open_dataset(store, engine="zarr") # FailsFails with
ValueError: Store is not read-only but mode is 'r'. Unable to create a read-only copy of the store. Please use a read-only store or a storage class that implements .with_read_only().
Additional output
No response
Metadata
Metadata
Assignees
Labels
bugPotential issues with the zarr-python libraryPotential issues with the zarr-python library
Activity
d-v-b commentedon Feb 10, 2026
thanks for the report, looks like we need to add the with_read_only logic to the wrapper store
Support with_read_only in LoggingStore and LatencyStore.
BorisTheBrave commentedon Feb 10, 2026
Yes, I've created a PR for you to do exactly that.
Support with read only in wrappers (#3700)