Skip to content

Commit 43743e1

Browse files
committed
remove deprecation warnings
1 parent b5e08e8 commit 43743e1

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/zarr/core/array.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import numpy as np
99
import numpy.typing as npt
10-
from typing_extensions import deprecated
1110

1211
from zarr._compat import _deprecate_positional_args
1312
from zarr.abc.codec import Codec, CodecPipeline
@@ -449,15 +448,13 @@ def basename(self) -> str | None:
449448
return None
450449

451450
@property
452-
@deprecated("AsyncArray.cdata_shape may be removed in an early zarr-python v3 release.")
453451
def cdata_shape(self) -> ChunkCoords:
454452
"""
455453
The shape of the chunk grid for this array.
456454
"""
457455
return tuple(ceildiv(s, c) for s, c in zip(self.shape, self.chunks, strict=False))
458456

459457
@property
460-
@deprecated("AsyncArray.nchunks may be removed in an early zarr-python v3 release.")
461458
def nchunks(self) -> int:
462459
"""
463460
The number of chunks in the stored representation of this array.
@@ -806,17 +803,13 @@ def fill_value(self) -> Any:
806803
return self.metadata.fill_value
807804

808805
@property
809-
@deprecated(
810-
"cdata_shape is transitional and will be removed in an early zarr-python v3 release."
811-
)
812806
def cdata_shape(self) -> ChunkCoords:
813807
"""
814808
The shape of the chunk grid for this array.
815809
"""
816810
return tuple(ceildiv(s, c) for s, c in zip(self.shape, self.chunks, strict=False))
817811

818812
@property
819-
@deprecated("nchunks is transitional and will be removed in an early zarr-python v3 release.")
820813
def nchunks(self) -> int:
821814
"""
822815
The number of chunks in the stored representation of this array.
@@ -2182,18 +2175,19 @@ def info(self) -> None:
21822175
)
21832176

21842177

2185-
@deprecated(
2186-
"nchunks_initialized is transitional and will be removed in an early zarr-python v3 release."
2187-
)
21882178
def nchunks_initialized(array: Array) -> int:
2179+
"""
2180+
Calculate the number of chunks that have been initialized, i.e. the number of chunks that have
2181+
been persisted to the storage backend.
2182+
"""
21892183
return len(chunks_initialized(array))
21902184

21912185

21922186
def chunks_initialized(array: Array) -> tuple[str, ...]:
21932187
"""
2194-
Return the keys of all the chunks that exist in storage.
2188+
Return the keys of the chunks that have been persisted to the storage backend.
21952189
"""
2196-
# todo: make this compose with the underlying async iterator
2190+
# TODO: make this compose with the underlying async iterator
21972191
store_contents = list(
21982192
collect_aiterator(array.store_path.store.list_prefix(prefix=array.store_path.path))
21992193
)

0 commit comments

Comments
 (0)