Skip to content

Commit 0613d83

Browse files
authored
remove dead code (#542)
* remove dead code * readd a bit
1 parent c89f762 commit 0613d83

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

kerchunk/utils.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import copy
33
import itertools
44
import fsspec.asyn
5-
from packaging.version import Version
65
from typing import Any, cast
76
import warnings
87

@@ -13,6 +12,11 @@
1312
import zarr.storage
1413

1514

15+
def dict_to_store(store_dict: dict):
16+
"""Create an in memory zarr store backed by the given dictionary"""
17+
return zarr.storage.MemoryStore(read_only=False, store_dict=store_dict)
18+
19+
1620
def refs_as_fs(
1721
refs,
1822
fs=None,
@@ -50,19 +54,6 @@ def refs_as_store(
5054
return fs_as_store(fss, read_only=read_only)
5155

5256

53-
def is_zarr3():
54-
"""Check if the installed zarr version is version 3"""
55-
return Version(zarr.__version__) >= Version("3.0.0.b2")
56-
57-
58-
def dict_to_store(store_dict: dict):
59-
"""Create an in memory zarr store backed by the given dictionary"""
60-
if is_zarr3():
61-
return zarr.storage.MemoryStore(read_only=False, store_dict=store_dict)
62-
else:
63-
return zarr.storage.KVStore(store_dict)
64-
65-
6657
def fs_as_store(fs: fsspec.asyn.AsyncFileSystem, read_only=False):
6758
"""Open the refs as a zarr store
6859

0 commit comments

Comments
 (0)