Skip to content

Remove old v3 #1742

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

Merged
merged 12 commits into from
Apr 22, 2024
Merged

Remove old v3 #1742

merged 12 commits into from
Apr 22, 2024

Conversation

d-v-b
Copy link
Contributor

@d-v-b d-v-b commented Apr 4, 2024

The plan here is to remove the old implementation of Zarr v3 (the old version 3). I think fully removing the old v3 stuff would be a minor accelerator for the new V3 effort because it removes the possibility of confusing the old v3 with the new v3 in the codebase, and it reduces the LOC of the codebase which makes the old code easier to read / test.

At the moment, I have just slathered deprecation warnings atop the old V3 routines, which lets my IDE (vscode) visually indicate which stuff is using those old routines. If we feel OK about this effort, I would go ahead and prune the old v3 classes entirely, and remove the WIP tag from this PR.

closes #1771

@d-v-b d-v-b added the in progress Someone is currently working on this label Apr 4, 2024
@jhamman
Copy link
Member

jhamman commented Apr 6, 2024

@d-v-b - do you think this code will ever be released? Since your target is the v3 branch, I think its reasonable to just remove these sections now.

DahnJ and others added 7 commits April 10, 2024 17:29
* refactor(v3): Using appropriate types

* fix(v3): Typing fixes + minor code fixes

* fix(v3): _sync_iter works with coroutines

* docs(v3/store/core.py): clearer comment

* fix(metadata.py): Use Any outside TYPE_CHECKING for Pydantic

* fix(zarr/v3): correct zarr format + remove unused method

* fix(v3/store/core.py): Potential suggestion on handling str store_like

* refactor(zarr/v3): Add more typing

* ci(.pre-commit-config.yaml): zarr v3 mypy checks turned on in pre-commit
…elopers#1728)

* Specify v3 hatch envs using GitHub actions matrix

* Update .github/workflows/test-v3.yml

Co-authored-by: Joe Hamman <[email protected]>

* Update .github/workflows/test-v3.yml

Co-authored-by: Joe Hamman <[email protected]>

* test on 3.12 too

* no 3.12

---------

Co-authored-by: Joe Hamman <[email protected]>
Co-authored-by: Joe Hamman <[email protected]>
* black -> ruff + cleanup

* format

* Preserve git blame

* pre-commit fix
@d-v-b
Copy link
Contributor Author

d-v-b commented Apr 10, 2024

This is ready for review.

To summarize the changes, because it's a lot of LOC:

  • Removed .zarr_version attributes from Group and Array classes, and the constructors for those classes, and the functions that wrapped the constructors for those classes. As of this PR, Array and Group are V2-only.
  • Removed all legacy V3 code + tests, and anything that was conditional on the zarr version (there was a lot of this in various places in the codebase)
  • Modified relevant tests to no longer parametrize over zarr versions, (and longer reference zarr version at all)
  • V2 Stores still have an _version attribute, which is the literal 2. We can get rid of that now or later if we want.

@d-v-b d-v-b requested a review from jhamman April 10, 2024 17:09
@d-v-b d-v-b changed the title [WIP] Remove old v3 Remove old v3 Apr 10, 2024
@d-v-b d-v-b removed the in progress Someone is currently working on this label Apr 10, 2024
@d-v-b d-v-b mentioned this pull request Apr 11, 2024
6 tasks
@d-v-b d-v-b added the V3 label Apr 12, 2024
@d-v-b d-v-b requested a review from rabernat April 12, 2024 11:47
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 did not review every single line here but this seems safe to move forward. Much of the remaining legacy code is likely to be retired as well but this certainly helps clean things up in the meantime.

@jhamman jhamman added this to the 3.0.0.alpha milestone Apr 22, 2024
Copy link
Member

@normanrz normanrz left a comment

Choose a reason for hiding this comment

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

Let's get this merged 👍

@d-v-b d-v-b merged commit 368b170 into zarr-developers:v3 Apr 22, 2024
14 checks passed
@d-v-b d-v-b deleted the remove_old_v3 branch April 22, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants