fix: adapt to zarr-metadata 0.4 type renames - #113
Merged
d-v-b merged 4 commits intoJul 30, 2026
Conversation
zarr-metadata 0.4.0 renames its TypedDict document types, putting the format version at the front of the name and marking the JSON-document form with a `JSON` suffix; the old names are removed, not aliased (zarr-developers/zarr-python#4211). Update the stubs accordingly: - ArrayMetadataV3 -> ZarrV3ArrayMetadataJSON - GroupMetadataV3 -> ZarrV3GroupMetadataJSON - ConsolidatedMetadataV3 -> ZarrV3ConsolidatedMetadataJSON - NamedConfigV3 -> ZarrV3NamedConfigJSON and require zarr-metadata >= 0.4. `JSONValue` and the `zarr_metadata.v3.data_type` name literals are unchanged. uv.lock still pins 0.3.0: 0.4.0 is not on PyPI yet, so the lockfile must be regenerated (`uv lock -P zarr-metadata`) once it is released. Assisted-by: ClaudeCode:claude-fable-5
Resolves conflicts in _array.pyi and _builder.pyi by keeping upstream's new content (fill_value property, expanded docstrings) with the zarr-metadata 0.4 type names, and renames ArrayMetadataV3 -> ZarrV3ArrayMetadataJSON in the tests upstream added. Assisted-by: ClaudeCode:claude-fable-5
Regenerated with `uv lock -P zarr-metadata` now that 0.4.0 is on PyPI. This also resolves the `pyodide` dependency group, which was missing from the lockfile (it was added to pyproject.toml without re-locking). Assisted-by: ClaudeCode:claude-fable-5
d-v-b
marked this pull request as ready for review
July 29, 2026 20:39
Contributor
Author
|
looks like ruff 0.16 is stricter, and the python lint job is pulling that in via the ruff action. @kylebarron do you want me to make these stricter linting checks pass in a separate PR? |
Member
|
ah, I've been updating a bunch of my repos for ruff 0.16 |
Member
|
fixed CI in #114 |
kylebarron
approved these changes
Jul 29, 2026
Resolves the uv.lock conflict by regenerating the lockfile from upstream's version (which now includes the ruff 0.16 bump and the pyodide group), re-applying the zarr-metadata 0.4.0 update. Assisted-by: ClaudeCode:claude-fable-5
Member
|
Feel free to merge if it looks good to you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Summary
zarr-metadata 0.4.0 renames its TypedDict document types — the format version moves to the front of the name and the JSON-document form gets a
JSONsuffix. The old names are removed, not aliased, so the previous stubs break against it.This PR renames every affected use in the
.pyistubs (and in the tests added onmain), bumps the dependency tozarr-metadata>=0.4, and locks 0.4.0:ArrayMetadataV3ZarrV3ArrayMetadataJSONGroupMetadataV3ZarrV3GroupMetadataJSONConsolidatedMetadataV3ZarrV3ConsolidatedMetadataJSONNamedConfigV3ZarrV3NamedConfigJSONJSONValueand thezarr_metadata.v3.data_typename literals (Float32DataTypeName, ...) are unchanged in 0.4, so those imports stay as they are. The Rust side is untouched —zarrs::metadata::v3::{ArrayMetadataV3, ...}are unrelated zarrs crate types.Note on the lockfile:
uv lockalso resolved thepyodidedependency group, which had been added topyproject.tomlwithout re-locking, so the lock diff includes those packages too.Verification
uv sync+maturin develop+pytestagainst zarr-metadata 0.4.0 from PyPI: 110 passed.zarr_metadatain the stubs and tests resolves against 0.4.0.ruff checkandruff format --checkpass.Closes #112