Skip to content

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

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

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

Conversation

@kumaraditya303

@kumaraditya303kumaraditya303 commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Comment threadDoc/c-api/set.rst Outdated
Comment threadDoc/data/threadsafety.dat
Comment threadDoc/data/threadsafety.dat Outdated
Comment threadDoc/data/threadsafety.dat Outdated
@kumaraditya303kumaraditya303 added the needs backport to 3.14 bugs and security fixes label Apr 2, 2026

@vstinnervstinner 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.

LGTM

Comment threadDoc/data/threadsafety.dat
kumaraditya303and others added 2 commits April 9, 2026 20:51
Co-authored-by: Victor Stinner <vstinner@python.org>

@vstinnervstinner 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.

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
ContributorAuthor

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

Comment threadDoc/data/threadsafety.dat Outdated
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:mainApr 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 dd88e77)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app

Copy link
Copy Markdown

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

@bedevere-appbedevere-appBot 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
kumaraditya303 added a commit to kumaraditya303/cpython that referenced this pull request Apr 11, 2026
Co-authored-by: Victor Stinner <vstinner@python.org>
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for freeto 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

@kumaraditya303@vstinner