Skip to content

Commit 1dad7b3

Browse files
committed
remove iter_chunk_keys
1 parent 2d7daca commit 1dad7b3

2 files changed

Lines changed: 0 additions & 48 deletions

File tree

src/zarr/core/array.py

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,28 +1370,6 @@ def _iter_shard_coords(
13701370
selection_shape=selection_shape,
13711371
)
13721372

1373-
@deprecated("Use _iter_shard_keys instead")
1374-
def _iter_chunk_keys(
1375-
self, *, origin: Sequence[int] | None = None, selection_shape: Sequence[int] | None = None
1376-
) -> Iterator[str]:
1377-
"""
1378-
Iterate over the keys of the stored objects supporting this array.
1379-
1380-
Parameters
1381-
----------
1382-
origin : Sequence[int] | None, default=None
1383-
The origin of the selection relative to the array's shard grid.
1384-
selection_shape : Sequence[int] | None, default=None
1385-
The shape of the selection in shard grid coordinates.
1386-
1387-
Yields
1388-
------
1389-
key: str
1390-
The storage key of each shard in the selection.
1391-
"""
1392-
# Iterate over the coordinates of chunks in chunk grid space.
1393-
return self._iter_shard_keys(origin=origin, selection_shape=selection_shape)
1394-
13951373
def _iter_shard_keys(
13961374
self, *, origin: Sequence[int] | None = None, selection_shape: Sequence[int] | None = None
13971375
) -> Iterator[str]:
@@ -2460,28 +2438,6 @@ def nbytes_stored(self) -> int:
24602438
"""
24612439
return sync(self._async_array.nbytes_stored())
24622440

2463-
@deprecated("Use _iter_shard_keys instead.")
2464-
def _iter_chunk_keys(
2465-
self, origin: Sequence[int] | None = None, selection_shape: Sequence[int] | None = None
2466-
) -> Iterator[str]:
2467-
"""
2468-
Iterate over the storage keys of each chunk, relative to an optional origin, and optionally
2469-
limited to a contiguous region in chunk grid coordinates.
2470-
2471-
Parameters
2472-
----------
2473-
origin : Sequence[int] | None, default=None
2474-
The origin of the selection relative to the array's chunk grid.
2475-
selection_shape : Sequence[int] | None, default=None
2476-
The shape of the selection in chunk grid coordinates.
2477-
2478-
Yields
2479-
------
2480-
key: str
2481-
The storage key of each chunk in the selection.
2482-
"""
2483-
return self._async_array._iter_shard_keys(origin=origin, selection_shape=selection_shape)
2484-
24852441
def _iter_shard_keys(
24862442
self, origin: Sequence[int] | None = None, selection_shape: Sequence[int] | None = None
24872443
) -> Iterator[str]:

tests/test_array.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,10 +1958,6 @@ def test_iter_shard_keys(
19581958
assert observed == expected
19591959
assert observed == tuple(arr._iter_shard_keys())
19601960
assert observed == tuple(arr._async_array._iter_shard_keys())
1961-
with pytest.warns(DeprecationWarning, match="Use _iter_shard_keys instead"):
1962-
assert observed == tuple(arr._iter_chunk_keys())
1963-
with pytest.warns(DeprecationWarning, match="Use _iter_shard_keys instead"):
1964-
assert observed == tuple(arr._async_array._iter_chunk_keys())
19651961

19661962

19671963
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)