KEMBAR78
[3.13] gh-132762: Fix underallocation bug in `dict.fromkeys()`(gh-133627) by colesbury · Pull Request #133686 · python/cpython · GitHub
Skip to content

Conversation

@colesbury
Copy link
Contributor

@colesbury colesbury 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)

…ythongh-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 <59097311+angela-tarantula@users.noreply.github.com>
@colesbury colesbury enabled auto-merge (squash) May 8, 2025 17:17
@colesbury colesbury merged commit 6ab4a4a into python:3.13 May 8, 2025
38 checks passed
@colesbury colesbury deleted the backport-421ba58-3.13 branch May 8, 2025 19:44
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