Skip to content

Commit f330e12

Browse files
authored
requests: allow non-mutable Mapping for files/hooks parameters (#7732)
1 parent df06044 commit f330e12

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

stubs/requests/requests/sessions.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ _Data: TypeAlias = str | bytes | Mapping[str, Any] | Iterable[tuple[str, str | N
4949
_Auth: TypeAlias = Union[tuple[str, str], _auth.AuthBase, Callable[[PreparedRequest], PreparedRequest]]
5050
_Cert: TypeAlias = Union[str, tuple[str, str]]
5151
_Files: TypeAlias = (
52-
MutableMapping[str, SupportsRead[str | bytes] | str | bytes]
53-
| MutableMapping[str, tuple[str | None, SupportsRead[str | bytes] | str | bytes]]
54-
| MutableMapping[str, tuple[str | None, SupportsRead[str | bytes] | str | bytes, str]]
55-
| MutableMapping[str, tuple[str | None, SupportsRead[str | bytes] | str | bytes, str, _TextMapping]]
52+
Mapping[str, SupportsRead[str | bytes] | str | bytes]
53+
| Mapping[str, tuple[str | None, SupportsRead[str | bytes] | str | bytes]]
54+
| Mapping[str, tuple[str | None, SupportsRead[str | bytes] | str | bytes, str]]
55+
| Mapping[str, tuple[str | None, SupportsRead[str | bytes] | str | bytes, str, _TextMapping]]
5656
)
5757
_Hook: TypeAlias = Callable[[Response], Any]
58-
_Hooks: TypeAlias = MutableMapping[str, _Hook | list[_Hook]]
59-
_HooksInput: TypeAlias = MutableMapping[str, Iterable[_Hook] | _Hook]
58+
_Hooks: TypeAlias = Mapping[str, _Hook | list[_Hook]]
59+
_HooksInput: TypeAlias = Mapping[str, Iterable[_Hook] | _Hook]
6060

6161
_ParamsMappingKeyType: TypeAlias = str | bytes | int | float
6262
_ParamsMappingValueType: TypeAlias = str | bytes | int | float | Iterable[str | bytes | int | float] | None

0 commit comments

Comments
 (0)