Skip to content

Commit 394e032

Browse files
committed
Avoid trying to async-wrap properties
1 parent 38d3cdb commit 394e032

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

fsspec/implementations/asyn_wrapper.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import asyncio
2+
import inspect
23
import functools
34
from fsspec.asyn import AsyncFileSystem
45

@@ -43,13 +44,22 @@ def __init__(self, sync_fs, *args, **kwargs):
4344
self.fs = sync_fs
4445
self._wrap_all_sync_methods()
4546

47+
@property
48+
def fsid(self):
49+
return f"async_{self.fs.fsid}"
50+
4651
def _wrap_all_sync_methods(self):
4752
"""
4853
Wrap all synchronous methods of the underlying filesystem with asynchronous versions.
4954
"""
5055
for method_name in dir(self.fs):
5156
if method_name.startswith("_"):
5257
continue
58+
59+
attr = inspect.getattr_static(self.fs, method_name)
60+
if isinstance(attr, property):
61+
continue
62+
5363
method = getattr(self.fs, method_name)
5464
if callable(method) and not asyncio.iscoroutinefunction(method):
5565
async_method = async_wrapper(method, obj=self)

0 commit comments

Comments
 (0)