-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
GH-140058: Clear key and value if PyTuple_New fails in dictiter_iternextitem #140059
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
GH-140058: Clear key and value if PyTuple_New fails in dictiter_iternextitem #140059
Conversation
|
I believe this should skip news. |
|
@eendebakpt Couldn't we actually use the |
The code here steals the references. When using the Update: If this is to be backported, I prefer to use a direct approach (as in this PR). Conversion to |
|
Thanks @sergey-miryanov for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…ter_iternextitem` (pythonGH-140059) (cherry picked from commit ded59f7) Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
…ter_iternextitem` (pythonGH-140059) (cherry picked from commit ded59f7) Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
|
GH-140107 is a backport of this pull request to the 3.14 branch. |
|
GH-140108 is a backport of this pull request to the 3.13 branch. |
|
Thanks all! |
Following code should decref
keyandvalueifPyTuple_Newfails:cpython/Objects/dictobject.c
Lines 5720 to 5726 in 6481539