File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 20
20
from fsspec .asyn import AsyncFileSystem
21
21
from fsspec .callbacks import DEFAULT_CALLBACK
22
22
from fsspec .core import filesystem , open , split_protocol
23
+ from fsspec .implementations .asyn_wrapper import AsyncFileSystemWrapper
23
24
from fsspec .utils import isfilelike , merge_offset_ranges , other_paths
24
25
25
26
logger = logging .getLogger ("fsspec.reference" )
@@ -757,6 +758,10 @@ def __init__(
757
758
self .fss [remote_protocol ] = fs
758
759
759
760
self .fss [None ] = fs or filesystem ("file" ) # default one
761
+ # Wrap any non-async filesystems to ensure async methods are available below
762
+ for k , f in self .fss .items ():
763
+ if not f .async_impl :
764
+ self .fss [k ] = AsyncFileSystemWrapper (f )
760
765
761
766
def _cat_common (self , path , start = None , end = None ):
762
767
path = self ._strip_protocol (path )
You can’t perform that action at this time.
0 commit comments