-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
requests: allow immutable headers #7932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks! Is it worth adding some test cases here? We've gone through quite a few iterations with these requests mappings. |
|
Most of the iterations were before |
This comment has been minimized.
This comment has been minimized.
|
Actually it is open-source. |
|
closed accidentally |
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
+1 to adding more projects to mypy-primer if they use code that isn't otherwise covered. But I feel like "adding more projects to mypy-primer" and "adding specific regression tests" aren't necessarily mutually exclusive. The huge value of mypy-primer is that it can detect problems that we don't even know are problems yet. But the disadvantage is we'd instantly lose coverage if a certain project decided to move from using |
|
|
I think we probably all agree that adding What we're debating is whether to also add regression tests to typeshed itself via our fairly new |
Fixes a problem reported by @rpdelaney in #7773 (comment)
I spent a while looking at requests source code, and I'm quite convinced that the headers can't be mutated. Each request is prepared before auth etc headers are applied, and the headers are copied when preparing.