gh-141004: Document missing PyThread* APIs#141810
Merged
ZeroIntensity merged 9 commits intopython:mainfrom Nov 25, 2025
Merged
Conversation
Member
Author
|
@colesbury, if you have time, I'd really appreciate your expertise here (especially on the |
vstinner
reviewed
Nov 21, 2025
Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner
approved these changes
Nov 24, 2025
| If *intr_flag* is ``1``, acquiring the lock may be interrupted by a signal, | ||
| in which case this function returns :c:enumerator:`PY_LOCK_INTR`. Upon | ||
| interruption, it's generally expected that the caller makes a call to | ||
| :c:func:`Py_MakePendingCalls` to propagate an exception to Python code. |
Member
There was a problem hiding this comment.
PyErr_CheckSignals() may be more appropriate than Py_MakePendingCalls(), no? Currently, it seems like Py_MakePendingCalls() is preferred.
Py_MakePendingCalls() is a superset of PyErr_CheckSignals(), so I'm fine with it.
Member
Author
There was a problem hiding this comment.
I think we should use Py_MakePendingCalls, especially considering we use it ourselves in _thread.lock.
|
Thanks @ZeroIntensity for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Nov 25, 2025
(cherry picked from commit a89ee4b) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
|
GH-141954 is a backport of this pull request to the 3.14 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Nov 25, 2025
(cherry picked from commit a89ee4b) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
|
GH-141955 is a backport of this pull request to the 3.13 branch. |
ZeroIntensity
added a commit
that referenced
this pull request
Nov 25, 2025
ZeroIntensity
added a commit
that referenced
this pull request
Nov 25, 2025
StanFromIreland
pushed a commit
to StanFromIreland/cpython
that referenced
this pull request
Dec 6, 2025
Co-authored-by: Victor Stinner <vstinner@python.org>
ashm-dev
pushed a commit
to ashm-dev/cpython
that referenced
this pull request
Dec 8, 2025
Co-authored-by: Victor Stinner <vstinner@python.org>
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
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.
📚 Documentation preview 📚: https://cpython-previews--141810.org.readthedocs.build/en/141810/c-api/init.html#legacy-locking-apis