diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index a7899a4a210c..0cdcba3b247a 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -387,8 +387,7 @@ class IO(Iterator[AnyStr], Generic[AnyStr]): def __enter__(self) -> 'IO[AnyStr]': ... @abstractmethod def __exit__(self, t: Optional[Type[BaseException]], value: Optional[BaseException], - # TODO: traceback should be TracebackType but that's defined in types - traceback: Optional[Any]) -> bool: ... + traceback: Optional[TracebackType]) -> bool: ... class BinaryIO(IO[bytes]): # TODO readinto diff --git a/stdlib/3/urllib/response.pyi b/stdlib/3/urllib/response.pyi index 2c16cb679c0a..67c4f193283d 100644 --- a/stdlib/3/urllib/response.pyi +++ b/stdlib/3/urllib/response.pyi @@ -1,9 +1,10 @@ # private module, we only expose what's needed -from typing import BinaryIO, Mapping, Optional +from io import BufferedRandom +from typing import Mapping, Optional from types import TracebackType -class addinfourl(BinaryIO): +class addinfourl(BufferedRandom): headers = ... # type: Mapping[str, str] url = ... # type: str code = ... # type: int