Skip to content

[3.14] gh-132762: Fix underallocation bug in dict.fromkeys()(gh-133627) #133685

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

Merged
merged 1 commit into from
May 8, 2025

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 8, 2025

The function dict_set_fromkeys() adds elements of a set to an existing
dictionary. The size of the expanded dictionary was estimated with
PySet_GET_SIZE(iterable), which did not take into account the size of the
existing dictionary.
(cherry picked from commit 421ba58)

Co-authored-by: Angela Liss [email protected]

…h-133627)

The function `dict_set_fromkeys()` adds elements of a set to an existing
dictionary. The size of the expanded dictionary was estimated with
`PySet_GET_SIZE(iterable)`, which did not take into account the size of the
existing dictionary.
(cherry picked from commit 421ba58)

Co-authored-by: Angela Liss <[email protected]>
@colesbury colesbury enabled auto-merge (squash) May 8, 2025 17:16
@colesbury colesbury merged commit 3e7552e into python:3.14 May 8, 2025
43 checks passed
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.

3 participants