Skip to content

Drop the mutable default in _estimate_size_in_bytes#2840

Closed
basheer-cloud wants to merge 2 commits intodpkp:masterfrom
basheer-cloud:fix/drop-the-mutable-default-in-estimate-size-in-byt
Closed

Drop the mutable default in _estimate_size_in_bytes#2840
basheer-cloud wants to merge 2 commits intodpkp:masterfrom
basheer-cloud:fix/drop-the-mutable-default-in-estimate-size-in-byt

Conversation

@basheer-cloud
Copy link
Copy Markdown
Contributor

I ran into this while reading through the code path around kafka/producer/kafka.py. Drop the mutable default in _estimate_size_in_bytes. Mutable defaults are shared across calls and usually turn into state leaks. I kept the patch small and re-ran syntax checks after applying it.

@dpkp
Copy link
Copy Markdown
Owner

dpkp commented Apr 10, 2026

Thanks - it looks like your PR inadvertently includes another commit from a different PR that recently landed. Can you rebase -i so that this PR only includes your changes?

@dpkp
Copy link
Copy Markdown
Owner

dpkp commented Apr 12, 2026

Resolved conflicts w/ cherry-pick in #2865

@dpkp dpkp closed this Apr 12, 2026
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.

2 participants