Skip to content

Commit 4e97b06

Browse files
authored
Use MutableMapping for headers (#6969)
1 parent d053d8f commit 4e97b06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/urllib/request.pyi

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ from _typeshed import StrOrBytesPath
44
from email.message import Message
55
from http.client import HTTPMessage, HTTPResponse, _HTTPConnectionProtocol
66
from http.cookiejar import CookieJar
7-
from typing import IO, Any, Callable, ClassVar, Mapping, NoReturn, Pattern, Sequence, TypeVar, overload
7+
from typing import IO, Any, Callable, ClassVar, Mapping, MutableMapping, NoReturn, Pattern, Sequence, TypeVar, overload
88
from urllib.error import HTTPError
99
from urllib.response import addclosehook, addinfourl
1010

@@ -52,7 +52,7 @@ class Request:
5252
origin_req_host: str
5353
selector: str
5454
data: bytes | None
55-
headers: dict[str, str]
55+
headers: MutableMapping[str, str]
5656
unredirected_hdrs: dict[str, str]
5757
unverifiable: bool
5858
method: str | None
@@ -61,7 +61,7 @@ class Request:
6161
self,
6262
url: str,
6363
data: bytes | None = ...,
64-
headers: dict[str, str] = ...,
64+
headers: MutableMapping[str, str] = ...,
6565
origin_req_host: str | None = ...,
6666
unverifiable: bool = ...,
6767
method: str | None = ...,

0 commit comments

Comments
 (0)