The Wayback Machine - https://web.archive.org/web/20260228000821/https://github.com/python/cpython/pull/144982
Skip to content

gh-144748: Document 3.12 and 3.14 changes to PyErr_CheckSignals#144982

Merged
ZeroIntensity merged 5 commits intopython:mainfrom
ZeroIntensity:document-pyerr-checksignals-change
Feb 21, 2026
Merged

gh-144748: Document 3.12 and 3.14 changes to PyErr_CheckSignals#144982
ZeroIntensity merged 5 commits intopython:mainfrom
ZeroIntensity:document-pyerr-checksignals-change

Conversation

@ZeroIntensity
Copy link
Member

@ZeroIntensity ZeroIntensity commented Feb 19, 2026 •

I'll need to remove the reference to the remote debugger in the 3.13 backport.


📚 Documentation preview 📚: https://cpython-previews--144982.org.readthedocs.build/en/144982/c-api/exceptions.html#c.PyErr_CheckSignals

@encukou
Copy link
Member

encukou commented Feb 20, 2026

My suggestion didn't apply well, sorry.
I pushed to your branch directly. Does this look good?

@ZeroIntensity
Copy link
Member Author

ZeroIntensity commented Feb 20, 2026 •

We might want to note that neither the GC nor debugger scripts can raise an exception here. Otherwise, this looks good.

@encukou
Copy link
Member

encukou commented Feb 20, 2026

Can you think of a situation where this info would be helpful?

Situations I can think of look best solved by if (PyErr_Occurred()) PyErr_WriteUnraisable, rather than avoiding individual sources of possible exceptions.

@ZeroIntensity
Copy link
Member Author

I was thinking about assertions, e.g. assert(PyErr_CheckSignals() == 0), but maybe that's too far-fetched.

@encukou
Copy link
Member

encukou commented Feb 20, 2026

Yeah, I don't think you should ever do that.

@ZeroIntensity
Copy link
Member Author

Ok, let's go with this.

@ZeroIntensity ZeroIntensity merged commit 0629261 into python:main Feb 21, 2026
29 checks passed
@ZeroIntensity ZeroIntensity deleted the document-pyerr-checksignals-change branch February 21, 2026 00:25
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Feb 21, 2026
@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 Feb 21, 2026
…s` (pythonGH-144982)

(cherry picked from commit 0629261)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 21, 2026
…s` (pythonGH-144982)

(cherry picked from commit 0629261)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 21, 2026

GH-145062 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 Feb 21, 2026
@bedevere-app
Copy link

bedevere-app bot commented Feb 21, 2026

GH-145063 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 Feb 21, 2026
ZeroIntensity added a commit that referenced this pull request Feb 21, 2026
…ls` (GH-144982) (GH-145062)

gh-144748: Document 3.12 and 3.14 changes to `PyErr_CheckSignals` (GH-144982)
(cherry picked from commit 0629261)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
ZeroIntensity added a commit that referenced this pull request Feb 21, 2026
…ls` (GH-144982) (GH-145063)

* gh-144748: Document 3.12 and 3.14 changes to `PyErr_CheckSignals` (GH-144982)
(cherry picked from commit 0629261)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
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 topic-C-API

2 participants