Skip to content
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

[3.13] gh-122208: Don't delivery PyDict_EVENT_ADDED until it can't fail #122326

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

DinoV
Copy link
Contributor

@DinoV DinoV commented Jul 26, 2024

Currently PyDict_EVENT_ADDED can be delivered when the insert is going to fail due to an OOM. This means the listener has no capability of knowing the true state of the dictionary if it fails.

This modifies the events to be delivered before the change has happened but only after any underlying necessary allocations have occurred.

Backported from main: #122207

@DinoV DinoV requested a review from carljm July 26, 2024 21:24
@DinoV DinoV changed the title gh-122208: Don't delivery PyDict_EVENT_ADDED until it can't fail [3.13] gh-122208: Don't delivery PyDict_EVENT_ADDED until it can't fail Jul 26, 2024
@DinoV DinoV marked this pull request as ready for review July 26, 2024 22:00
@DinoV DinoV merged commit 11292ab into python:3.13 Jul 30, 2024
38 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.

2 participants