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
The AsyncPath.walk method does not return an AsyncGenerator as expected, but instead a synchronous Generator object. This appears to be because of .walk not being defined in AsyncPath and thus the method from Path is used instead.
Expected Behaviour
AsyncPath.walk should return an AsyncGenerator object that can be used in async for statements and implements __aiter__ and __anext__.
Actual Behaviour
AsyncPath.walk follows the MRO and is really Path.walk, thus returning a normal generator. Using it in async for will cause a TypeError.
The
AsyncPath.walk
method does not return anAsyncGenerator
as expected, but instead a synchronousGenerator
object. This appears to be because of.walk
not being defined inAsyncPath
and thus the method fromPath
is used instead.Expected Behaviour
AsyncPath.walk
should return anAsyncGenerator
object that can be used inasync for
statements and implements__aiter__
and__anext__
.Actual Behaviour
AsyncPath.walk
follows the MRO and is reallyPath.walk
, thus returning a normal generator. Using it inasync for
will cause a TypeError.Steps to reproduce
aiopath
The text was updated successfully, but these errors were encountered: