zarr-developers / zarr-python

An implementation of chunked, compressed, N-dimensional arrays for Python.
http://zarr.readthedocs.io/
MIT License
1.44k stars 272 forks source link

[v3] Array constructor API compatibility #1953

Open jhamman opened 2 months ago

jhamman commented 2 months ago

In addition to the top-level API compatibility layer, we are also seeing that some applications are interacting with the Array class constructor directly. For example, see this from Dask.

z = zarr.Array(url, read_only=True, path=component, **kwargs)

But our current constructor doesn't support this.

https://github.com/zarr-developers/zarr-python/blob/661acb37f08a77cc1a86c0da55288e89f2388801/src/zarr/array.py#L572-L574

To be honest, I've been assuming no one was using Array.__init__ but that seems to have been a mistake.

Thanks @will-moore for reporting this (https://github.com/zarr-developers/zarr-python/pull/1884#issuecomment-2152253454).

cc @jrbourbeau