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

gh-141004: Document missing `PyThread*` APIs by ZeroIntensity · Pull Request #141810 · python/cpython · GitHub

/ cpython Public

gh-141004: Document missing PyThread* APIs - #141810

Merged
ZeroIntensity merged 9 commits into
python:mainfrom
ZeroIntensity:document-pythread
Nov 25, 2025
Merged

gh-141004: Document missing PyThread* APIs#141810
ZeroIntensity merged 9 commits into
python:mainfrom
ZeroIntensity:document-pythread

Conversation

ZeroIntensity commented Nov 20, 2025
edited
Loading

Copy link
Copy Markdown
Member

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 Bot added awaiting core review docs Documentation in the Doc dir skip news labels Nov 20, 2025
github-project-automation Bot moved this to Todo in Docs PRs Nov 20, 2025

ZeroIntensity commented Nov 20, 2025
edited
Loading

Copy link
Copy Markdown
Member Author

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

Comment thread Doc/c-api/init.rst Outdated
Comment thread Doc/c-api/init.rst Outdated
Comment thread Doc/c-api/init.rst Outdated
Comment thread Doc/c-api/init.rst Outdated
Comment thread Doc/c-api/init.rst Outdated
Comment thread Doc/c-api/init.rst Outdated
Comment thread Doc/c-api/init.rst Outdated
Comment thread Doc/c-api/init.rst Outdated
Comment thread Doc/c-api/init.rst Outdated
Comment thread Doc/c-api/init.rst Outdated
ZeroIntensity and others added 2 commits November 21, 2025 08:42

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

Comment thread Doc/c-api/init.rst
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
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

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
Copy Markdown
Member Author

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

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

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

Copy link
Copy Markdown

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 Bot commented Nov 25, 2025

Copy link
Copy Markdown

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

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 Bot commented Nov 25, 2025

Copy link
Copy Markdown

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

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>
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

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL