|
28 | 28 | normalize_storage_path, buffer_size,
|
29 | 29 | normalize_fill_value, nolock, normalize_dtype)
|
30 | 30 | from zarr.meta import encode_array_metadata, encode_group_metadata
|
31 |
| -from zarr.compat import PY2, binary_type |
| 31 | +from zarr.compat import PY2, binary_type, OrderedDict_move_to_end |
32 | 32 | from numcodecs.registry import codec_registry
|
33 |
| -from zarr.errors import (err_contains_group, err_contains_array, err_path_not_found, |
34 |
| - err_bad_compressor, err_fspath_exists_notdir, err_read_only) |
| 33 | +from zarr.errors import (err_contains_group, err_contains_array, err_bad_compressor, |
| 34 | + err_fspath_exists_notdir, err_read_only) |
35 | 35 |
|
36 | 36 |
|
37 | 37 | array_meta_key = '.zarray'
|
@@ -1783,7 +1783,7 @@ def __getitem__(self, key):
|
1783 | 1783 | # cache hit if no KeyError is raised
|
1784 | 1784 | self.hits += 1
|
1785 | 1785 | # treat the end as most recently used
|
1786 |
| - self._values_cache.move_to_end(key) |
| 1786 | + OrderedDict_move_to_end(self._values_cache, key) |
1787 | 1787 |
|
1788 | 1788 | except KeyError:
|
1789 | 1789 | # cache miss, retrieve value from the store
|
|
0 commit comments