You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And instead something that satisfies a mutableMapping would be more correct?
The X to my Y problem is that I am very much used to working with .headers set to a built-in dict. And if it works and is supported by requests , could I submit a patch to the type stubs? Satisfying this typing constraint as it is right now feels incorrect given the long history of the dict() being sufficient.
The text was updated successfully, but these errors were encountered:
For reference, this was changed in #3043, where the problems was that session.headers.copy() didn't work. But according to @sigmavirus24's comment, this is not guaranteed to work, so changing it back like you suggested sounds like a good idea to me.
According to this comment in the requests project:
I think this means that the strict typing shown here is not correct:
https://github.com/python/typeshed/blob/main/stubs/requests/requests/sessions.pyi#L116
And instead something that satisfies a mutableMapping would be more correct?
The X to my Y problem is that I am very much used to working with
.headers
set to a built-in dict. And if it works and is supported byrequests
, could I submit a patch to the type stubs? Satisfying this typing constraint as it is right now feels incorrect given the long history of the dict() being sufficient.The text was updated successfully, but these errors were encountered: