From 97c6806582bed88afae2bb4183d10fe45fbad6fc Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 9 Apr 2021 00:49:39 -0700 Subject: [PATCH] Revert "Awaitable.__await__ should accept an Iterator rather than a Generator (#5194)" (#5195) This reverts commit c687e297eced412afc547612702f744816fc69fb. --- stdlib/typing.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/typing.pyi b/stdlib/typing.pyi index 2faaee016..03aee05e3 100644 --- a/stdlib/typing.pyi +++ b/stdlib/typing.pyi @@ -207,7 +207,7 @@ class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]): @runtime_checkable class Awaitable(Protocol[_T_co]): @abstractmethod - def __await__(self) -> Iterator[_T_co]: ... + def __await__(self) -> Generator[Any, None, _T_co]: ... class Coroutine(Awaitable[_V_co], Generic[_T_co, _T_contra, _V_co]): __name__: str