From 4e97b061755e95313c98ff750942ae86bb2b7fad Mon Sep 17 00:00:00 2001 From: q0w <43147888+q0w@users.noreply.github.com> Date: Sat, 22 Jan 2022 13:01:29 +0300 Subject: [PATCH] Use MutableMapping for headers (#6969) --- stdlib/urllib/request.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/urllib/request.pyi b/stdlib/urllib/request.pyi index 3749d7a39..a69bd650c 100644 --- a/stdlib/urllib/request.pyi +++ b/stdlib/urllib/request.pyi @@ -4,7 +4,7 @@ from _typeshed import StrOrBytesPath from email.message import Message from http.client import HTTPMessage, HTTPResponse, _HTTPConnectionProtocol from http.cookiejar import CookieJar -from typing import IO, Any, Callable, ClassVar, Mapping, NoReturn, Pattern, Sequence, TypeVar, overload +from typing import IO, Any, Callable, ClassVar, Mapping, MutableMapping, NoReturn, Pattern, Sequence, TypeVar, overload from urllib.error import HTTPError from urllib.response import addclosehook, addinfourl @@ -52,7 +52,7 @@ class Request: origin_req_host: str selector: str data: bytes | None - headers: dict[str, str] + headers: MutableMapping[str, str] unredirected_hdrs: dict[str, str] unverifiable: bool method: str | None @@ -61,7 +61,7 @@ class Request: self, url: str, data: bytes | None = ..., - headers: dict[str, str] = ..., + headers: MutableMapping[str, str] = ..., origin_req_host: str | None = ..., unverifiable: bool = ..., method: str | None = ...,