zarr-python
zarr-python copied to clipboard
[v3] deleting a group does not delete subgroups
Zarr version
3
Numcodecs version
?
Python Version
?
Operating System
?
Installation
?
Description
deleting a group does not delete subgroups.
Discovered in #2189
Steps to reproduce
import zarr
from zarr.store import MemoryStore
store = MemoryStore(mode="w")
g1 = zarr.group(store=store)
g1.create_group("0")
g1.create_group("0/0")
del g1["0"]
g1["0/0"] # succeeds
Additional output
No response
Looks like the MemoryStore implementation is missing a erase_prefix function to allow proper deletion of a group and its children.
I have a fix for this in the works.