Skip to content

remove warnings about vlen-utf8 and vlen-bytes codecs #3268

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 7 commits into from
Jul 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions changes/3268.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Removed warnings that were emitted when using the ``vlen-utf8`` and ``vlen-bytes`` codecs. Those
warnings are no longer needed now that both of these codecs are backed by specification documents.
19 changes: 0 additions & 19 deletions src/zarr/codecs/vlen_utf8.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from dataclasses import dataclass
from typing import TYPE_CHECKING
from warnings import warn

import numpy as np
from numcodecs.vlen import VLenBytes, VLenUTF8
Expand All @@ -25,15 +24,6 @@

@dataclass(frozen=True)
class VLenUTF8Codec(ArrayBytesCodec):
def __init__(self) -> None:
warn(
"The codec `vlen-utf8` is currently not part in the Zarr format 3 specification. It "
"may not be supported by other zarr implementations and may change in the future.",
category=UserWarning,
stacklevel=2,
)
super().__init__()

@classmethod
def from_dict(cls, data: dict[str, JSON]) -> Self:
_, configuration_parsed = parse_named_configuration(
Expand Down Expand Up @@ -80,15 +70,6 @@ def compute_encoded_size(self, input_byte_length: int, _chunk_spec: ArraySpec) -

@dataclass(frozen=True)
class VLenBytesCodec(ArrayBytesCodec):
def __init__(self) -> None:
warn(
"The codec `vlen-bytes` is currently not part in the Zarr format 3 specification. It "
"may not be supported by other zarr implementations and may change in the future.",
category=UserWarning,
stacklevel=2,
)
super().__init__()

@classmethod
def from_dict(cls, data: dict[str, JSON]) -> Self:
_, configuration_parsed = parse_named_configuration(
Expand Down
Loading