diff --git a/fsspec/implementations/asyn_wrapper.py b/fsspec/implementations/asyn_wrapper.py index a7e40606d..af38ba1a7 100644 --- a/fsspec/implementations/asyn_wrapper.py +++ b/fsspec/implementations/asyn_wrapper.py @@ -1,4 +1,5 @@ import asyncio +import inspect import functools from fsspec.asyn import AsyncFileSystem @@ -43,6 +44,10 @@ def __init__(self, sync_fs, *args, **kwargs): self.fs = sync_fs self._wrap_all_sync_methods() + @property + def fsid(self): + return f"async_{self.fs.fsid}" + def _wrap_all_sync_methods(self): """ Wrap all synchronous methods of the underlying filesystem with asynchronous versions. @@ -50,6 +55,11 @@ def _wrap_all_sync_methods(self): for method_name in dir(self.fs): if method_name.startswith("_"): continue + + attr = inspect.getattr_static(self.fs, method_name) + if isinstance(attr, property): + continue + method = getattr(self.fs, method_name) if callable(method) and not asyncio.iscoroutinefunction(method): async_method = async_wrapper(method, obj=self)