Add to_agen wrapper and aiofiles.os.walk.#193
Conversation
84b6491 to
0faf5b5
Compare
|
#160 (comment) - the |
|
Apologies. I have a small baby nowadays. So the original sync |
Hello and no need for apologies, au contraire, congratulations. |
|
Waits for the #199 to be merged. |
b19fc7e to
e755f03
Compare
e755f03 to
a614045
Compare
That PR has been merged now, can we please merge this one as well? 🙂 |
2df49e8 to
8afdb68
Compare
57be981 to
a69548b
Compare
os.walk.
a69548b to
cd3f7ae
Compare
os.walk.to_agen wrapper and aiofiles.os.walk.
|
@Martin005 , @rrrix, @Tinche , hello. I need your review, WIP is highlighted, but a milestone is reached, so I need to understand what is good and what can be improved, especially on the implementation of def wrap(cb: Callable) -> Callable:
if inspect.isgeneratorfunction(cb):
return _to_agen(cb)
return _to_coro(cb) # the former routine-only `wrap` decoratorPrior to Python 3.12 this fails because |
Closes #160 .
Also may close #167 .
Potentially closes #207 .
Features:
to_agendecorator responsible for wrapping sync iterators and turning them into asynchronous ones - analogously to theto_corodecorator that makes a coroutine from a given functionos.walkiterator with tests