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 2020from fsspec .asyn import AsyncFileSystem
2121from fsspec .callbacks import DEFAULT_CALLBACK
2222from fsspec .core import filesystem , open , split_protocol
23+ from fsspec .implementations .asyn_wrapper import AsyncFileSystemWrapper
2324from fsspec .utils import isfilelike , merge_offset_ranges , other_paths
2425
2526logger = logging .getLogger ("fsspec.reference" )
@@ -757,6 +758,10 @@ def __init__(
757758 self .fss [remote_protocol ] = fs
758759
759760 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 )
760765
761766 def _cat_common (self , path , start = None , end = None ):
762767 path = self ._strip_protocol (path )
You can’t perform that action at this time.
0 commit comments