Skip to content

Commit 3763661

Browse files
authored
asyn_wrapper: avoid creating async version of open method (#1769)
The `_open` method is part of an AbstractFileSystem interface, and it is supposed to be synchronous.
1 parent 216885a commit 3763661

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fsspec/implementations/asyn_wrapper.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ def _wrap_all_sync_methods(self):
5757
"""
5858
Wrap all synchronous methods of the underlying filesystem with asynchronous versions.
5959
"""
60+
excluded_methods = {"open"}
6061
for method_name in dir(self.sync_fs):
61-
if method_name.startswith("_"):
62+
if method_name.startswith("_") or method_name in excluded_methods:
6263
continue
6364

6465
attr = inspect.getattr_static(self.sync_fs, method_name)

0 commit comments

Comments
 (0)