diff --git a/stdlib/_typeshed/wsgi.pyi b/stdlib/_typeshed/wsgi.pyi index 81ca12910..de731aea9 100644 --- a/stdlib/_typeshed/wsgi.pyi +++ b/stdlib/_typeshed/wsgi.pyi @@ -6,7 +6,7 @@ import sys from _typeshed import OptExcInfo -from collections.abc import Callable, Iterable +from collections.abc import Callable, Iterable, Iterator from typing import Any, Protocol from typing_extensions import TypeAlias @@ -31,7 +31,7 @@ else: def read(self, __size: int = ...) -> bytes: ... def readline(self, __size: int = ...) -> bytes: ... def readlines(self, __hint: int = ...) -> list[bytes]: ... - def __iter__(self) -> Iterable[bytes]: ... + def __iter__(self) -> Iterator[bytes]: ... # WSGI error streams per PEP 3333, stable class ErrorStream(Protocol): diff --git a/stdlib/wsgiref/types.pyi b/stdlib/wsgiref/types.pyi index b8ece8d57..4e8f47264 100644 --- a/stdlib/wsgiref/types.pyi +++ b/stdlib/wsgiref/types.pyi @@ -1,4 +1,4 @@ -from collections.abc import Callable, Iterable +from collections.abc import Callable, Iterable, Iterator from sys import _OptExcInfo from typing import Any, Protocol from typing_extensions import TypeAlias @@ -17,7 +17,7 @@ class InputStream(Protocol): def read(self, __size: int = ...) -> bytes: ... def readline(self, __size: int = ...) -> bytes: ... def readlines(self, __hint: int = ...) -> list[bytes]: ... - def __iter__(self) -> Iterable[bytes]: ... + def __iter__(self) -> Iterator[bytes]: ... class ErrorStream(Protocol): def flush(self) -> object: ...