Skip to content

fix(python): resolve mutable default arguments and side effects in http client#123

Open
afreireo wants to merge 1 commit into
google:mainfrom
afreireo:fix-python-http-client-defaults
Open

fix(python): resolve mutable default arguments and side effects in http client#123
afreireo wants to merge 1 commit into
google:mainfrom
afreireo:fix-python-http-client-defaults

Conversation

@afreireo

@afreireo afreireo commented Jul 4, 2026

Copy link
Copy Markdown

Avoid using mutable dictionary defaults in the get method to prevent state pollution across calls. Additionally, create a copy of the headers dictionary in _make_headers to avoid mutating caller-provided dictionaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant