FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-142518: add thread safety annotations for tuple C-API by kumaraditya303 · Pull Request #148012 · python/cpython · GitHub

/ cpython Public

gh-142518: add thread safety annotations for tuple C-API - #148012

Merged
kumaraditya303 merged 6 commits into
python:mainfrom
kumaraditya303:tuple-capi
Apr 7, 2026
Merged

gh-142518: add thread safety annotations for tuple C-API#148012
kumaraditya303 merged 6 commits into
python:mainfrom
kumaraditya303:tuple-capi

Conversation

kumaraditya303 commented Apr 2, 2026
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Contributor

ZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Isn't PyTuple_SetItem thread-safe on an "existing" tuple if the tuple is uniquely referenced?

Comment thread Doc/c-api/tuple.rst Outdated
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

Copy link
Copy Markdown
Contributor Author

Isn't PyTuple_SetItem thread-safe on an "existing" tuple if the tuple is uniquely referenced?

Yes, that's what the docs mean by "This function should only be used to fill in brand new tuples" as brand new tuples are uniquely referenced.

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

kumaraditya303 merged commit 03d712e into python:main Apr 7, 2026
34 checks passed
kumaraditya303 deleted the tuple-capi branch April 7, 2026 20:25
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL