Skip to content

Commit

Permalink
deprecate(n5): add deprecation warning to N5Store
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamman committed Aug 20, 2024
1 parent c5c4698 commit 2a20842
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions zarr/n5.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ class N5Store(NestedDirectoryStore):
"""

def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
warnings.warn(
"The N5Store is deprecated and will be removed in a Zarr-Python version 3, "
"see https://github.com/zarr-developers/zarr-python/issues/1274 and "
"https://github.com/zarr-developers/n5py for more information.",
FutureWarning,
stacklevel=2,
)

def __getitem__(self, key: str) -> bytes:
if key.endswith(zarr_group_meta_key):
key_new = key.replace(zarr_group_meta_key, n5_attrs_key)
Expand Down

0 comments on commit 2a20842

Please sign in to comment.