zarr-python icon indicating copy to clipboard operation
zarr-python copied to clipboard

Add full copy of zarr-python v2.18.7 under src/zarr/v2

Open jni opened this issue 6 months ago • 2 comments

This proposes to include a complete copy of zarr v2.18.7 under the zarr.v2 namespace. The goal is for libraries using the v2 API to be able to migrate gradually, and not have to be environment-incompatible with libraries that have fully migrated to v3. Such libraries could then do:

import zarr

if not zarr.__version__.startswith('2.'):
    import zarr.v2 as zarr

It would also buy us more time to improve the migration guide.

For more discussion, see this Zulip thread.

Currently, I have not imported it in zarr.__init__.py, so one would have to explicitly import it to discover it. I think that's probably the right thing.

TODO:

  • [x] ~~Add unit tests and/or doctests in docstrings~~
  • [x] ~~Add docstrings and API docs for any new/modified user-facing classes and functions~~
  • [ ] New/modified features documented in docs/user-guide/*.rst
  • [ ] Changes documented as a new file in changes/
  • [ ] GitHub Actions have all passed
  • [ ] Test coverage is 100% (Codecov passes)

jni avatar May 21 '25 07:05 jni

Hmm looks like I have a lot of test fixing in my future. 😂

jni avatar May 21 '25 09:05 jni

Thanks for doing this @jni - I think would personally very much appreciate this feature.

jeromekelleher avatar May 21 '25 10:05 jeromekelleher