Skip to content

Commit a235660

Browse files
committed
move unstable spec warning to errors
1 parent 6a208eb commit a235660

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/zarr/core/dtype/common.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from typing_extensions import ReadOnly
1717

1818
from zarr.core.common import NamedConfig
19-
from zarr.errors import ZarrFutureWarning
19+
from zarr.errors import UnstableSpecificationWarning
2020

2121
EndiannessStr = Literal["little", "big"]
2222
ENDIANNESS_STR: Final = "little", "big"
@@ -217,9 +217,6 @@ class HasObjectCodec:
217217
object_codec_id: ClassVar[str]
218218

219219

220-
class UnstableSpecificationWarning(ZarrFutureWarning): ...
221-
222-
223220
def v3_unstable_dtype_warning(dtype: object) -> None:
224221
"""
225222
Emit this warning when a data type does not have a stable zarr v3 spec

src/zarr/errors.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,6 @@ class ZarrRuntimeWarning(RuntimeWarning):
9292
"""
9393
A warning for dubious runtime behavior.
9494
"""
95+
96+
97+
class UnstableSpecificationWarning(ZarrFutureWarning): ...

tests/test_dtype/test_npy/test_bytes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import pytest
33

44
from tests.test_dtype.test_wrapper import BaseTestZDType
5-
from zarr.core.dtype.common import UnstableSpecificationWarning
65
from zarr.core.dtype.npy.bytes import NullTerminatedBytes, RawBytes, VariableLengthBytes
6+
from zarr.errors import UnstableSpecificationWarning
77

88

99
class TestNullTerminatedBytes(BaseTestZDType):

tests/test_dtype/test_npy/test_string.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
from tests.test_dtype.test_wrapper import BaseTestZDType
77
from zarr.core.dtype import FixedLengthUTF32
8-
from zarr.core.dtype.common import UnstableSpecificationWarning
98
from zarr.core.dtype.npy.string import _NUMPY_SUPPORTS_VLEN_STRING, VariableLengthUTF8
9+
from zarr.errors import UnstableSpecificationWarning
1010

1111
if _NUMPY_SUPPORTS_VLEN_STRING:
1212

0 commit comments

Comments
 (0)