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! |
…ter_iternextitem` (python#140059)
Following code should decref
keyandvalueifPyTuple_Newfails:cpython/Objects/dictobject.c
Lines 5720 to 5726 in 6481539