Currently it doesn't because typing.AsyncGenerator is typed with def aclose(self) -> Awaitable[None]: while we're trying to match against a protocol with async def aclose(self) -> None:. async def implies a return type of Coroutine which native async generator aclose() doesn't provide (it returns a different sort of awaitable).
Currently it doesn't because
typing.AsyncGenerator
is typed withdef aclose(self) -> Awaitable[None]:
while we're trying to match against a protocol withasync def aclose(self) -> None:
.async def
implies a return type ofCoroutine
which native async generatoraclose()
doesn't provide (it returns a different sort of awaitable).