File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3+ import json
34import warnings
45from contextlib import suppress
56from typing import TYPE_CHECKING , Any
67
8+ from packaging .version import parse as parse_version
9+
710from zarr .abc .store import (
811 ByteRequest ,
912 OffsetByteRequest ,
@@ -42,16 +45,13 @@ def _make_async(fs: AbstractFileSystem) -> AsyncFileSystem:
4245 is wrapped with AsyncFileSystemWrapper.
4346 """
4447 import fsspec
45- from packaging .version import parse as parse_version
4648
4749 fsspec_version = parse_version (fsspec .__version__ )
4850 if fs .async_impl and fs .asynchronous :
4951 # Already an async instance of an async filesystem, nothing to do
5052 return fs
5153 if fs .async_impl :
5254 # Convert sync instance of an async fs to an async instance
53- import json
54-
5555 fs_dict = json .loads (fs .to_json ())
5656 fs_dict ["asynchronous" ] = True
5757 return fsspec .AbstractFileSystem .from_json (json .dumps (fs_dict ))
You can’t perform that action at this time.
0 commit comments