Skip to content

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

Merged
colesbury merged 1 commit into
python:3.13from
colesbury:backport-421ba58-3.13
May 8, 2025
Merged

[3.13] gh-132762: Fix underallocation bug in dict.fromkeys()(gh-133627)#133686
colesbury merged 1 commit into
python:3.13from
colesbury:backport-421ba58-3.13

Conversation

@colesbury

@colesbury colesbury commented May 8, 2025

Copy link
Copy Markdown
Contributor

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>
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