Skip to content

gh-142518: add thread safety docs for set C-APIs#146562

Merged
kumaraditya303 merged 9 commits intopython:mainfrom
kumaraditya303:set-capi
Apr 10, 2026
Merged

gh-142518: add thread safety docs for set C-APIs#146562
kumaraditya303 merged 9 commits intopython:mainfrom
kumaraditya303:set-capi

Conversation

@kumaraditya303
Copy link
Copy Markdown
Contributor

@kumaraditya303 kumaraditya303 commented Mar 28, 2026

@kumaraditya303 kumaraditya303 requested a review from vstinner March 31, 2026 11:41
@kumaraditya303 kumaraditya303 added the needs backport to 3.14 bugs and security fixes label Apr 2, 2026
@kumaraditya303 kumaraditya303 requested a review from vstinner April 2, 2026 10:59
Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

kumaraditya303 and others added 2 commits April 9, 2026 20:51
Co-authored-by: Victor Stinner <vstinner@python.org>
Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -125,6 +125,29 @@ PyByteArray_GET_SIZE:atomic:
PyByteArray_AsString:compatible:
PyByteArray_AS_STRING:compatible:

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.

You may add PySet_Check(), PyFrozenSet_Check(), PyAnySet_Check(), PySet_CheckExact(), PyAnySet_CheckExact() and PyFrozenSet_CheckExact() functions, they are atomic.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am thinking of covering this and other type checks in next PR, so skipping this for now

Co-authored-by: Victor Stinner <vstinner@python.org>
@kumaraditya303 kumaraditya303 enabled auto-merge (squash) April 10, 2026 19:27
@kumaraditya303 kumaraditya303 merged commit dd88e77 into python:main Apr 10, 2026
30 checks passed
@miss-islington-app
Copy link
Copy Markdown

Thanks @kumaraditya303 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 10, 2026
(cherry picked from commit dd88e77fad887aaf00ead1a3ba655fc00fd1dc25)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 10, 2026

GH-148362 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Apr 10, 2026
@kumaraditya303 kumaraditya303 deleted the set-capi branch April 10, 2026 19:40
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.

2 participants