Skip to content

fix: stop emitting UnstableSpecificationWarning for the spec'd "struct" data type - #202

Merged
d-v-b merged 16 commits into
mainfrom
remove-struct-unstable-warning
Jul 28, 2026
Merged

fix: stop emitting UnstableSpecificationWarning for the spec'd "struct" data type#202
d-v-b merged 16 commits into
mainfrom
remove-struct-unstable-warning

Conversation

@d-v-b

Copy link
Copy Markdown
Owner

Summary

The struct data type now has a stable Zarr V3 specification in zarr-extensions, but Struct.to_json(zarr_format=3) was still emitting an UnstableSpecificationWarning ("this data type does not have a Zarr V3 specification"). That message is now factually wrong for struct, and it forces every test touching structured arrays to carry a filterwarnings("ignore") marker.

This removes the warning for struct only.

Audit of all data types that emit v3_unstable_dtype_warning

I checked every call site against the published specs in zarr-extensions:

Written v3 nameClassSpec in zarr-extensions?Action
structStructYes — stable, name matchesStop warning
structuredStructured⚠️ Yes, but a read-only legacy alias — spec states implementations MUST NOT write itKeep warning (write is discouraged)
variable_length_bytesVariableLengthBytes⚠️ Concept is spec'd, but under the name bytes, not variable_length_bytesKeep (name mismatch — separate decision)
null_terminated_bytesNullTerminatedBytes❌ No specKeep
raw_bytesRawBytes❌ No spec (the r core type is raw bits, different)Keep

So struct is the only one that cleanly qualifies; the other four warnings are intentionally left in place.

Changes

  • Struct.to_json no longer calls v3_unstable_dtype_warning. The sibling Structured (legacy alias) and the three bytes data types are untouched.

Notes / follow-ups (out of scope here)

  • variable_length_bytes is written under a name that doesn't match its spec (bytes). Resolving that is an interop/rename decision, separate from this warning cleanup.
  • The ~25 filterwarnings("ignore::...UnstableSpecificationWarning") markers across the test suite are left as-is; many also cover the bytes/structured types that still warn. They can be pruned for struct-only tests in a follow-up.

Verification

  • uv run pytest tests/test_dtype/ → 713 passed, 5 skipped.
  • Confirmed at runtime: Struct no longer warns; Structured, null_terminated_bytes, raw_bytes, variable_length_bytes still do.
  • test_unstable_dtype_warning (in test_dtype/test_npy/test_bytes.py) only asserts warnings for the three bytes types, so it is unaffected.

🤖 Generated with Claude Code

https://claude.ai/code/session_019rRWaxXfZ3ZmbiZYWZoDBP

dependabotBotand others added 14 commits May 31, 2026 19:28
…#176)
Bumps the actions group with 8 updates in the / directory:
| Package | From | To |
| --- | --- | --- |
| [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) | `0.9.5` | `0.9.6` |
| [codecov/codecov-action](https://github.com/codecov/codecov-action) | `6.0.0` | `6.0.1` |
| [github/issue-metrics](https://github.com/github/issue-metrics) | `4.2.2` | `4.2.7` |
| [j178/prek-action](https://github.com/j178/prek-action) | `2.0.3` | `2.0.4` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `7.0.0` | `7.0.1` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `7.0.0` | `8.0.1` |
| [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) | `1.13.0` | `1.14.0` |
| [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) | `0.5.3` | `0.5.6` |
Updates `prefix-dev/setup-pixi` from 0.9.5 to 0.9.6
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](prefix-dev/setup-pixi@1b2de7f...5185adf)
Updates `codecov/codecov-action` from 6.0.0 to 6.0.1
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@57e3a13...e79a696)
Updates `github/issue-metrics` from 4.2.2 to 4.2.7
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](github-community-projects/issue-metrics@c9e9838...1e38d5e)
Updates `j178/prek-action` from 2.0.3 to 2.0.4
- [Release notes](https://github.com/j178/prek-action/releases)
- [Commits](j178/prek-action@6ad8027...bdca6f1)
Updates `actions/upload-artifact` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v7...043fb46)
Updates `actions/download-artifact` from 7.0.0 to 8.0.1
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v7...3e5f45b)
Updates `pypa/gh-action-pypi-publish` from 1.13.0 to 1.14.0
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](pypa/gh-action-pypi-publish@v1.13.0...cef2210)
Updates `zizmorcore/zizmor-action` from 0.5.3 to 0.5.6
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](zizmorcore/zizmor-action@b1d7e1f...5f14fd0)
---
updated-dependencies:
- dependency-name: prefix-dev/setup-pixi
dependency-version: 0.9.6
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: actions
- dependency-name: codecov/codecov-action
dependency-version: 6.0.1
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: actions
- dependency-name: github/issue-metrics
dependency-version: 4.2.7
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: actions
- dependency-name: j178/prek-action
dependency-version: 2.0.4
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: actions
- dependency-name: actions/upload-artifact
dependency-version: 7.0.1
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: actions
- dependency-name: actions/download-artifact
dependency-version: 8.0.1
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
- dependency-name: pypa/gh-action-pypi-publish
dependency-version: 1.14.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: actions
- dependency-name: zizmorcore/zizmor-action
dependency-version: 0.5.6
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: actions
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The `struct` data type now has a stable Zarr V3 specification
(zarr-extensions/data-types/struct), so serializing it no longer
warrants an UnstableSpecificationWarning. The legacy `structured`
alias and the unspecified bytes data types (null_terminated_bytes,
raw_bytes, variable_length_bytes) continue to warn.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019rRWaxXfZ3ZmbiZYWZoDBP
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019rRWaxXfZ3ZmbiZYWZoDBP
@d-v-b

Copy link
Copy Markdown
OwnerAuthor

self-merging this, as it's a safe QOL improvement.

@d-v-b
d-v-b merged commit a024bb2 into mainJul 28, 2026
34 of 35 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@d-v-b