Add to_a(sync)gen wrapper able to turn a sync generator function into its async variant and introduce an async version of `os.walk`.
Closes #160 . Also may close #167 .
Features:
- add the
to_agendecorator responsible for wrapping sync iterators and turning them into asynchronous ones - analogously to theto_corodecorator that makes a coroutine from a given function - add an async version of the
os.walkiterator with tests - a couple of extra unrelated minor changes
https://github.com/Tinche/aiofiles/issues/160#issuecomment-2470024881 - the os.listdir already wrapped, the os.walk added.
@Tinche , hello. Rebased and ready for review, all checks have been passed.
Update: I found the issue #167 on an "invented-here" solution, what are your suggestions?
Apologies. I have a small baby nowadays.
So the original sync os.walk is a generator, right? This has some very useful properties which we should keep. Can we make the async version an async generator? Each step can do a step of the sync one.
Apologies. I have a small baby nowadays.
So the original sync
os.walkis a generator, right? This has some very useful properties which we should keep. Can we make the async version an async generator? Each step can do a step of the sync one.
Hello and no need for apologies, au contraire, congratulations.
Waits for the #199 to be merged.
Waits for the https://github.com/Tinche/aiofiles/pull/199 to be merged.
That PR has been merged now, can we please merge this one as well? 🙂
Waits for the #199 to be merged.
That PR has been merged now, can we please merge this one as well? 🙂
Good to go after the #213 .
Memo: the "README" file must be updated.