Make more operations in AsyncLocalFileSystem actually async
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Start by reading AsyncLocalFileSystem and the async file methods named in the issue: _write_text, _write_bytes, _read_text, _read_bytes, _put_file, and _pipe_file; compare them with AsyncFileSystem.open_async and the synchronous defaults in AbstractFileSystem. The issue leaves the design open: decide whether these should use open_async directly or be added as base defaults. Done means the applicable operations use async file I/O and have tests covering their behavior.
Written by the indexing model from the issue text.
Description
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_text[^1], 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?
[^1]: _write_text, _write_bytes, _read_text, _read_bytes, _put_file, _pipe_file.
- Dominant language
- Python
- Stars
- 18
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from iterative/morefs
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in iterative/morefs
Similar issues
-
A JSON chat answer blocks the backend event loop for the whole RAG runPossibly taken @NopeCharon claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
The-OpenROAD-Project/ORAssistant#656 ·
Maintainers usually reply within 1 day
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionErrorPossibly taken @jejjohnson claimed this today. Opentype:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jejjohnson/integrix#144 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
finos/ai-governance-framework#459 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day