Skip to content

Commit 7c6160e

Browse files
authored
remove warnings about vlen-utf8 and vlen-bytes codecs (#3268)
* remove warning about vlen-utf8 codec now that a spec is published * remove vlen-bytes warning * changelog * miscify it
1 parent 9cbc7b0 commit 7c6160e

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

changes/3268.misc.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Removed warnings that were emitted when using the ``vlen-utf8`` and ``vlen-bytes`` codecs. Those
2+
warnings are no longer needed now that both of these codecs are backed by specification documents.

src/zarr/codecs/vlen_utf8.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from dataclasses import dataclass
44
from typing import TYPE_CHECKING
5-
from warnings import warn
65

76
import numpy as np
87
from numcodecs.vlen import VLenBytes, VLenUTF8
@@ -25,15 +24,6 @@
2524

2625
@dataclass(frozen=True)
2726
class VLenUTF8Codec(ArrayBytesCodec):
28-
def __init__(self) -> None:
29-
warn(
30-
"The codec `vlen-utf8` is currently not part in the Zarr format 3 specification. It "
31-
"may not be supported by other zarr implementations and may change in the future.",
32-
category=UserWarning,
33-
stacklevel=2,
34-
)
35-
super().__init__()
36-
3727
@classmethod
3828
def from_dict(cls, data: dict[str, JSON]) -> Self:
3929
_, configuration_parsed = parse_named_configuration(
@@ -80,15 +70,6 @@ def compute_encoded_size(self, input_byte_length: int, _chunk_spec: ArraySpec) -
8070

8171
@dataclass(frozen=True)
8272
class VLenBytesCodec(ArrayBytesCodec):
83-
def __init__(self) -> None:
84-
warn(
85-
"The codec `vlen-bytes` is currently not part in the Zarr format 3 specification. It "
86-
"may not be supported by other zarr implementations and may change in the future.",
87-
category=UserWarning,
88-
stacklevel=2,
89-
)
90-
super().__init__()
91-
9273
@classmethod
9374
def from_dict(cls, data: dict[str, JSON]) -> Self:
9475
_, configuration_parsed = parse_named_configuration(

0 commit comments

Comments
 (0)