|
7 | 7 |
|
8 | 8 | import numpy as np |
9 | 9 | import numpy.typing as npt |
10 | | -from typing_extensions import deprecated |
11 | 10 |
|
12 | 11 | from zarr._compat import _deprecate_positional_args |
13 | 12 | from zarr.abc.codec import Codec, CodecPipeline |
@@ -449,15 +448,13 @@ def basename(self) -> str | None: |
449 | 448 | return None |
450 | 449 |
|
451 | 450 | @property |
452 | | - @deprecated("AsyncArray.cdata_shape may be removed in an early zarr-python v3 release.") |
453 | 451 | def cdata_shape(self) -> ChunkCoords: |
454 | 452 | """ |
455 | 453 | The shape of the chunk grid for this array. |
456 | 454 | """ |
457 | 455 | return tuple(ceildiv(s, c) for s, c in zip(self.shape, self.chunks, strict=False)) |
458 | 456 |
|
459 | 457 | @property |
460 | | - @deprecated("AsyncArray.nchunks may be removed in an early zarr-python v3 release.") |
461 | 458 | def nchunks(self) -> int: |
462 | 459 | """ |
463 | 460 | The number of chunks in the stored representation of this array. |
@@ -806,17 +803,13 @@ def fill_value(self) -> Any: |
806 | 803 | return self.metadata.fill_value |
807 | 804 |
|
808 | 805 | @property |
809 | | - @deprecated( |
810 | | - "cdata_shape is transitional and will be removed in an early zarr-python v3 release." |
811 | | - ) |
812 | 806 | def cdata_shape(self) -> ChunkCoords: |
813 | 807 | """ |
814 | 808 | The shape of the chunk grid for this array. |
815 | 809 | """ |
816 | 810 | return tuple(ceildiv(s, c) for s, c in zip(self.shape, self.chunks, strict=False)) |
817 | 811 |
|
818 | 812 | @property |
819 | | - @deprecated("nchunks is transitional and will be removed in an early zarr-python v3 release.") |
820 | 813 | def nchunks(self) -> int: |
821 | 814 | """ |
822 | 815 | The number of chunks in the stored representation of this array. |
@@ -2182,18 +2175,19 @@ def info(self) -> None: |
2182 | 2175 | ) |
2183 | 2176 |
|
2184 | 2177 |
|
2185 | | -@deprecated( |
2186 | | - "nchunks_initialized is transitional and will be removed in an early zarr-python v3 release." |
2187 | | -) |
2188 | 2178 | 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 | + """ |
2189 | 2183 | return len(chunks_initialized(array)) |
2190 | 2184 |
|
2191 | 2185 |
|
2192 | 2186 | def chunks_initialized(array: Array) -> tuple[str, ...]: |
2193 | 2187 | """ |
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. |
2195 | 2189 | """ |
2196 | | - # todo: make this compose with the underlying async iterator |
| 2190 | + # TODO: make this compose with the underlying async iterator |
2197 | 2191 | store_contents = list( |
2198 | 2192 | collect_aiterator(array.store_path.store.list_prefix(prefix=array.store_path.path)) |
2199 | 2193 | ) |
|
0 commit comments