-
-
Notifications
You must be signed in to change notification settings - Fork 356
Open
Labels
bugPotential issues with the zarr-python libraryPotential issues with the zarr-python library
Description
LocalStore.delete
removes entire directory trees, i.e. many objects:
zarr-python/src/zarr/storage/local.py
Lines 206 to 213 in 4c3081c
async def delete(self, key: str) -> None: | |
# docstring inherited | |
self._check_writable() | |
path = self.root / key | |
if path.is_dir(): # TODO: support deleting directories? shutil.rmtree? | |
shutil.rmtree(path) | |
else: | |
await asyncio.to_thread(path.unlink, True) # Q: we may want to raise if path is missing |
MemoryStore.delete
removes single keys, i.e. just one object:
zarr-python/src/zarr/storage/memory.py
Lines 134 to 140 in 4c3081c
async def delete(self, key: str) -> None: | |
# docstring inherited | |
self._check_writable() | |
try: | |
del self._store_dict[key] | |
except KeyError: | |
pass |
We should pick one of the two options. The fact that we got this far with such skew also means that our store tests should be made more extensive.
Metadata
Metadata
Assignees
Labels
bugPotential issues with the zarr-python libraryPotential issues with the zarr-python library