Skip to content

Commit 97aa42f

Browse files
tasansalAltay Sansal
andauthored
Add missing import for AsyncFileSystemWrapper for _make_async in _fsspec.py (#3195)
* Add missing import for AsyncFileSystemWrapper in `_fsspec.py` * Add missing changelog entry for AsyncFileSystemWrapper import fix * Move AsyncFileSystemWrapper import past the version check in `_fsspec.py` * Add newline after AsyncFileSystemWrapper import in `_fsspec.py` * Simplify import statement for AsyncFileSystemWrapper in `_fsspec.py` --------- Co-authored-by: Altay Sansal <altay.sansal@tgs.com>
1 parent baabf08 commit 97aa42f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

changes/3195.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add missing import for AsyncFileSystemWrapper for _make_async in _fsspec.py

src/zarr/storage/_fsspec.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ def _make_async(fs: AbstractFileSystem) -> AsyncFileSystem:
6868
"2024.12.0 or later to enable this functionality."
6969
)
7070

71-
return fsspec.implementations.asyn_wrapper.AsyncFileSystemWrapper(fs, asynchronous=True)
71+
from fsspec.implementations.asyn_wrapper import AsyncFileSystemWrapper
72+
73+
return AsyncFileSystemWrapper(fs, asynchronous=True)
7274

7375

7476
class FsspecStore(Store):

0 commit comments

Comments
 (0)