Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/202.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Stop emitting an `UnstableSpecificationWarning` when serializing the `struct` data type to Zarr V3 metadata. The `struct` data type now has a stable Zarr V3 specification. The legacy `structured` alias and the unspecified `null_terminated_bytes`, `raw_bytes`, and `variable_length_bytes` data types continue to warn.
4 changes: 3 additions & 1 deletion src/zarr/core/dtype/npy/structured.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,9 @@ def to_json(self, zarr_format: ZarrFormat) -> StructuredJSON_V2 | StructJSON_V3:
]
return {"name": fields_v2, "object_codec_id": None}
elif zarr_format == 3:
v3_unstable_dtype_warning(self)
# The "struct" data type has a stable Zarr V3 specification
# (https://github.com/zarr-developers/zarr-extensions/tree/main/data-types/struct),
# so unlike the legacy "structured" alias it does not emit an unstable-spec warning.
fields_v3 = [
{"name": f_name, "data_type": f_dtype.to_json(zarr_format=zarr_format)}
for f_name, f_dtype in self.fields
Expand Down
Loading