From 83d86a9ce7090306802df5728fe3898a859c750d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Thu, 9 Jan 2025 12:22:32 +0545 Subject: [PATCH] asyn_wrapper: avoid creating async version of open method The `_open` method is part of an AbstractFileSystem interface, and it is supposed to be synchronous. --- fsspec/implementations/asyn_wrapper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fsspec/implementations/asyn_wrapper.py b/fsspec/implementations/asyn_wrapper.py index 43604a28c..f58b0b612 100644 --- a/fsspec/implementations/asyn_wrapper.py +++ b/fsspec/implementations/asyn_wrapper.py @@ -57,8 +57,9 @@ def _wrap_all_sync_methods(self): """ Wrap all synchronous methods of the underlying filesystem with asynchronous versions. """ + excluded_methods = {"open"} for method_name in dir(self.sync_fs): - if method_name.startswith("_"): + if method_name.startswith("_") or method_name in excluded_methods: continue attr = inspect.getattr_static(self.sync_fs, method_name)