GeezerVison is showing github.com — gh-161694: [C API] Add PyTupleWriter API by vstinner · Pull Request #161639 · python/cpython
Conversation
vstinner
commented
Nov 8, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Add _PyTuple_ResizeKeepOnError(). It copies the tuple
when shrinking the tuple to leave the tuple unchanged on error.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Oh. There are some legit test failures. Example:
test_structseq_newtype_null_descr_doc (test.test_capi.test_misc.Test_testcapi.test_structseq_newtype_null_descr_doc) ... python: ../cpython-ro-srcdir/Include/internal/pycore_tuple.h:119: _PyTupleWriter_CheckConsistency: Assertion `Py_REFCNT(tuple) == 1' failed.
Fatal Python error: Aborted
Current thread 0x000075e4dba4f780 [python] (most recent call first):
File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/unittest/case.py", line 637 in _callTestMethod
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
vstinner
changed the title
[C API] Add PyTupleWriter API
gh-161694: [C API] Add PyTupleWriter API
Nov 9, 2026
|
Oh. I published this PR on cpython by mistake :-( I was trying to create a PR on my personal fork. So it seems like I have to finish the PR to make it ready for review :-D
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.