Skip to content

Conversation

@ZeroIntensity
Copy link
Member

@ZeroIntensity ZeroIntensity commented Nov 20, 2025

@ZeroIntensity ZeroIntensity added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Nov 20, 2025
@bedevere-app bedevere-app bot added awaiting core review docs Documentation in the Doc dir skip news labels Nov 20, 2025
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Nov 20, 2025
@ZeroIntensity
Copy link
Member Author

ZeroIntensity commented Nov 20, 2025

@colesbury, if you have time, I'd really appreciate your expertise here (especially on the PyThread_exit_thread warning).

ZeroIntensity and others added 2 commits November 21, 2025 08:42
Co-authored-by: Victor Stinner <vstinner@python.org>
Copy link
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

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.
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we should use Py_MakePendingCalls, especially considering we use it ourselves in _thread.lock.

@ZeroIntensity ZeroIntensity merged commit a89ee4b into python:main Nov 25, 2025
32 checks passed
@ZeroIntensity ZeroIntensity deleted the document-pythread branch November 25, 2025 17:53
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Nov 25, 2025
@miss-islington-app
Copy link

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>
@bedevere-app
Copy link

bedevere-app bot commented Nov 25, 2025

GH-141954 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 Nov 25, 2025
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>
@bedevere-app
Copy link

bedevere-app bot commented Nov 25, 2025

GH-141955 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 25, 2025
ZeroIntensity added a commit that referenced this pull request Nov 25, 2025
…41954)

gh-141004: Document missing `PyThread*` APIs (GH-141810)
(cherry picked from commit a89ee4b)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
ZeroIntensity added a commit that referenced this pull request Nov 25, 2025
…41955)

* gh-141004: Document missing `PyThread*` APIs (GH-141810)
(cherry picked from commit a89ee4b)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants