Skip to content

Commit 00f225f

Browse files
committed
async: add set_session
This is used in multiple implementations (s3fs, http, etc) that allow _external_ async use and is documented in fsspec docs (but the example is http-specific), so let's add it to the spec, so that we could officially wrap it in fsspec#745
1 parent de73472 commit 00f225f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fsspec/asyn.py

+8
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,14 @@ def loop(self):
301301
raise RuntimeError("This class is not fork-safe")
302302
return self._loop
303303

304+
async def set_session(self, *args, **kwargs):
305+
"""Establish a connection.
306+
Returns
307+
-------
308+
Session to be closed later with await .close()
309+
"""
310+
raise NotImplementedError
311+
304312
async def _rm_file(self, path, **kwargs):
305313
raise NotImplementedError
306314

0 commit comments

Comments
 (0)