diff --git a/stdlib/3/urllib/error.pyi b/stdlib/3/urllib/error.pyi index 191c765ed..16ceae8fc 100644 --- a/stdlib/3/urllib/error.pyi +++ b/stdlib/3/urllib/error.pyi @@ -7,6 +7,5 @@ class URLError(IOError): reason: Union[str, BaseException] class HTTPError(URLError, addinfourl): code: int - headers: Dict[str, str] def __init__(self, url, code, msg, hdrs, fp) -> None: ... class ContentTooShortError(URLError): ... diff --git a/stdlib/3/urllib/response.pyi b/stdlib/3/urllib/response.pyi index 7cbc045a3..dca0efacc 100644 --- a/stdlib/3/urllib/response.pyi +++ b/stdlib/3/urllib/response.pyi @@ -1,6 +1,7 @@ # private module, we only expose what's needed from typing import BinaryIO, Iterable, List, Mapping, Optional, Type, TypeVar +from email.message import Message from types import TracebackType _AIUT = TypeVar("_AIUT", bound=addbase) @@ -31,8 +32,8 @@ class addbase(BinaryIO): def writelines(self, lines: Iterable[bytes]) -> None: ... class addinfo(addbase): - headers: Mapping[str, str] - def info(self) -> Mapping[str, str]: ... + headers: Message + def info(self) -> Message: ... class addinfourl(addinfo): url: str