Skip to content

Commit

Permalink
Ensure reference FS wraps any sync filesystems
Browse files Browse the repository at this point in the history
  • Loading branch information
moradology committed Nov 21, 2024
1 parent bbe0591 commit 59a87b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fsspec/implementations/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from fsspec.asyn import AsyncFileSystem
from fsspec.callbacks import DEFAULT_CALLBACK
from fsspec.core import filesystem, open, split_protocol
from fsspec.implementations.asyn_wrapper import AsyncFileSystemWrapper
from fsspec.utils import isfilelike, merge_offset_ranges, other_paths

logger = logging.getLogger("fsspec.reference")
Expand Down Expand Up @@ -757,6 +758,10 @@ def __init__(
self.fss[remote_protocol] = fs

self.fss[None] = fs or filesystem("file") # default one
# Wrap any non-async filesystems to ensure async methods are available below
for k, f in self.fss.items():
if not f.async_impl:
self.fss[k] = AsyncFileSystemWrapper(f)

def _cat_common(self, path, start=None, end=None):
path = self._strip_protocol(path)
Expand Down

0 comments on commit 59a87b4

Please sign in to comment.