Repository navigation
GH-59313: Do not allow incomplete tuples, or tuples with NULLs. #117747
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
d4d6f24
More robust and maybe faster tuples
markshannon 6a1f806
Add test
markshannon 9aeb6da
Merge branch 'main' into safer-tuples
markshannon 40a49d6
Add news
markshannon 0a06553
Don't leak references
markshannon 207005c
Revert changes to _PyTuple_FromArraySteal
markshannon 03643cf
Mark list as empty before transfering ownership of items
markshannon 0d8974e
Document change to PyTuple_SET_ITEM
markshannon 8fad5a4
Redo test
markshannon e4b4f39
Recommend using None
markshannon f4c0a29
Fix formatting
markshannon bf69fc5
Improve thread safety of _PyList_AsTupleTakeItems
markshannon 4d0ad9e
Minor tweaks
markshannon 269832a
Doc that the value cannot be NULL.
markshannon 3a766d8
Handle the mathematically challenged function _PyTuple_Resize
markshannon 003264f
Merge branch 'main' into safer-tuples
markshannon a155802
Fix handling of zero and negative sizes
markshannon ae437f1
Fix up docs
markshannon 03ce121
Move news
markshannon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Merge branch 'main' into safer-tuples
- Loading branch information
commit 003264fb1ed023375eca1ff44a204f563d938bfd
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You are viewing a condensed version of this merge commit. You can view the full changes here.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.python.org/dev/c-api/tuple.html#c.PyTuple_SET_ITEM and https://docs.python.org/dev/c-api/tuple.html#c.PyTuple_SetItem don't say that the second argument must not be NULL. I suggest to modify the doc to be extra explicit about it.