You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make more operations in AsyncLocalFileSystem actually async #81
Thanks for providing this library. I use fsspec in a few projects (mostly via universal-pathlib) which are async and it's great to have an async option for local usage in order to have a consistent API.
Something I noticed in the AsyncLocalFileSystem implementation is that most operations, even those related to file io (rather than file-system io) aren't using aiofile when it appears that they could. I'm thinking of things like _write_text1, which doesn't use the open_async due to the methods they wrap calling AbstractFileSystem.open (which is synchronous).
Perhaps I'm missing something, however this feels like a missed opportunity to make the most of aiofile offering a complete async file interface.
I noticed that the base AsyncFileSystem doesn't implement those methods in terms of open_async as AbstractFileSystem does for open, so perhaps there's something I'm missing which makes that undesirable? And/or is this something which would be better fixed by implementing them there as defaults, rather than requiring every async implementation to build them from scratch?
Would you be open to a PR which added this support?
Activity