|
4 | 4 | from asyncio import gather |
5 | 5 | from dataclasses import dataclass |
6 | 6 | from itertools import starmap |
7 | | -from typing import TYPE_CHECKING, Protocol, runtime_checkable |
| 7 | +from typing import TYPE_CHECKING, Literal, Protocol, runtime_checkable |
8 | 8 |
|
9 | 9 | if TYPE_CHECKING: |
10 | 10 | from collections.abc import AsyncGenerator, AsyncIterator, Iterable |
11 | 11 | from types import TracebackType |
12 | 12 | from typing import Any, Self, TypeAlias |
13 | 13 |
|
14 | 14 | from zarr.core.buffer import Buffer, BufferPrototype |
15 | | - from zarr.core.common import BytesLike |
16 | 15 |
|
17 | 16 | __all__ = ["ByteGetter", "ByteSetter", "Store", "set_or_delete"] |
18 | 17 |
|
@@ -310,25 +309,12 @@ async def delete(self, key: str) -> None: |
310 | 309 | ... |
311 | 310 |
|
312 | 311 | @property |
313 | | - @abstractmethod |
314 | | - def supports_partial_writes(self) -> bool: |
315 | | - """Does the store support partial writes?""" |
316 | | - ... |
317 | | - |
318 | | - @abstractmethod |
319 | | - async def set_partial_values( |
320 | | - self, key_start_values: Iterable[tuple[str, int, BytesLike]] |
321 | | - ) -> None: |
322 | | - """Store values at a given key, starting at byte range_start. |
| 312 | + def supports_partial_writes(self) -> Literal[False]: |
| 313 | + """Does the store support partial writes? |
323 | 314 |
|
324 | | - Parameters |
325 | | - ---------- |
326 | | - key_start_values : list[tuple[str, int, BytesLike]] |
327 | | - set of key, range_start, values triples, a key may occur multiple times with different |
328 | | - range_starts, range_starts (considering the length of the respective values) must not |
329 | | - specify overlapping ranges for the same key |
| 315 | + Partial writes are no longer used by Zarr, so this is always false. |
330 | 316 | """ |
331 | | - ... |
| 317 | + return False |
332 | 318 |
|
333 | 319 | @property |
334 | 320 | @abstractmethod |
@@ -499,7 +485,7 @@ async def get( |
499 | 485 | self, prototype: BufferPrototype, byte_range: ByteRequest | None = None |
500 | 486 | ) -> Buffer | None: ... |
501 | 487 |
|
502 | | - async def set(self, value: Buffer, byte_range: ByteRequest | None = None) -> None: ... |
| 488 | + async def set(self, value: Buffer) -> None: ... |
503 | 489 |
|
504 | 490 | async def delete(self) -> None: ... |
505 | 491 |
|
|
0 commit comments