Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate v3 code on v2 branch #2873

Closed
wants to merge 7 commits into from

Conversation

dstansby
Copy link
Contributor

@dstansby dstansby commented Feb 28, 2025

For zarr-python 2.19.0 I thought it would be good to tear out support for partial reads/writes (deprecated in #2844), and any zarr 3 code (this PR). That should make it easier to maintain for at least the next few months.

This PR deprecates v3 code on the v2 branch. It also removes all the v3 tests - since this API is unsupported, I thought the easiest thing to do here was just tear out the tests, instead of trying to keep them but catch deprecation warnings.

I also skipped the sqlite store tests because they are failing (e.g., see this GH actions run from another recent PR). I think debugging/supporting this is pretty low priority, so I'm happy with just plain skipping these to get the v2 tests passing again.

@dstansby dstansby added the V2 Affects the v2 branch label Feb 28, 2025
@dstansby dstansby changed the title Deprecated v3 code on v2 branch Deprecate v3 code on v2 branch Feb 28, 2025
@dstansby dstansby marked this pull request as draft February 28, 2025 11:24
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 92.29%. Comparing base (2bf7e45) to head (00e9f9c).
Report is 4 commits behind head on support/v2.

Files with missing lines Patch % Lines
zarr/hierarchy.py 42.85% 4 Missing ⚠️
zarr/__init__.py 50.00% 1 Missing ⚠️
zarr/convenience.py 66.66% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (87.50%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project status has failed because the head coverage (92.29%) is below the target coverage (100.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@              Coverage Diff               @@
##           support/v2    #2873      +/-   ##
==============================================
- Coverage       99.95%   92.29%   -7.67%     
==============================================
  Files              38       37       -1     
  Lines           14672    13614    -1058     
==============================================
- Hits            14666    12565    -2101     
- Misses              6     1049    +1043     
Files with missing lines Coverage Δ
zarr/_storage/v3.py 26.11% <100.00%> (-73.89%) ⬇️
zarr/_storage/v3_storage_transformers.py 23.85% <100.00%> (-76.15%) ⬇️
zarr/tests/test_attrs.py 97.75% <100.00%> (-2.25%) ⬇️
zarr/tests/test_convenience.py 98.43% <100.00%> (-1.57%) ⬇️
zarr/tests/test_core.py 99.32% <100.00%> (-0.63%) ⬇️
zarr/tests/test_creation.py 99.81% <100.00%> (-0.19%) ⬇️
zarr/tests/test_hierarchy.py 94.85% <100.00%> (-5.15%) ⬇️
zarr/tests/test_storage.py 96.22% <100.00%> (-3.78%) ⬇️
zarr/tests/util.py 98.52% <ø> (-0.07%) ⬇️
zarr/__init__.py 87.50% <50.00%> (-12.50%) ⬇️
... and 2 more

... and 8 files with indirect coverage changes

@dstansby dstansby marked this pull request as ready for review February 28, 2025 12:08
Copy link
Member

@joshmoore joshmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Restart of Windows 3.11 went green. 👍 (Looks like we are hitting periodic limits.)
  • I don't have a strong feeling about disabling the tests. I would have likely have left them but 🤷

Co-authored-by: Josh Moore <[email protected]>
Copy link
Member

@jhamman jhamman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to suggest we keep the experimental v3 code as-is in Zarr-Python until we hit the end of 6-month support window following the 3.0. I don't think there is much of a maintenance burden with keeping this in the support branch, is there?

@dstansby
Copy link
Contributor Author

What's the motivation for wanting to keep it around? My thinking was if folks really want it, they can pin to 2.18.x, but it's no longer being developed, maintained, or fixed in the same way as the v3 releases. So I think it's actual quite worthwhile deprecating it and removing it just to prevent folks from using old un-maintained code (that is probably buggy, given all the recent fixes on the v3 branch).

In terms of maintenance, I think the less code we have to maintain the easier it will be - things keep periodically breaking in the v2 branch (e.g., the sqlie3 store I skipped the tests of here), and the less surface area we have open the better.

@dstansby dstansby marked this pull request as draft March 3, 2025 13:14
@dstansby
Copy link
Contributor Author

dstansby commented Mar 3, 2025

I managed to fix the sqlite failures at #2880, which is better than the solution this branch which is to skip the tests.

@jhamman
Copy link
Member

jhamman commented Mar 4, 2025

What's the motivation for wanting to keep it around?

We are still using it and until there is a complete migration story for datatypes/codecs in v3, we can't fully migrate.

Noting that we've also discussed this on Zulip


I'll also note that we already have a FutureWarning in place warning users that this version will be removed in 3.0.

In [1]: import zarr

In [2]: g = zarr.group(zarr_version=3)
/Users/jhamman/miniforge3/envs/earthmover-dev-311/lib/python3.11/site-packages/zarr/_storage/store.py:39: FutureWarning: The experimental Zarr V3 implementation in this version of Zarr-Python is not in alignment with the final V3 specification. This version will be removed in Zarr-Python 3 in favor of a spec compliant version.
  warnings.warn(

Based on the wording here, we've already communicated that the experimental v3 support would be removed in 3.0 -- not 2.18.

@dstansby dstansby closed this Mar 5, 2025
@dstansby dstansby deleted the dep-v3 branch March 5, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V2 Affects the v2 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants