diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index de4813a5d..6e75c5ef7 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -22,6 +22,8 @@ from typing import ( IO, AbstractSet, Any, + AsyncIterable, + AsyncIterator, BinaryIO, ByteString, Callable, @@ -959,6 +961,13 @@ _AnyStr_co = TypeVar("_AnyStr_co", str, bytes, covariant=True) class _PathLike(Protocol[_AnyStr_co]): def __fspath__(self) -> _AnyStr_co: ... +if sys.version_info >= (3, 10): + def aiter(__iterable: AsyncIterable[_T]) -> AsyncIterator[_T]: ... + @overload + async def anext(__i: AsyncIterator[_T]) -> _T: ... + @overload + async def anext(__i: AsyncIterator[_T], default: _VT) -> Union[_T, _VT]: ... + if sys.version_info >= (3, 8): def compile( source: Union[str, bytes, mod, AST],