Skip to content

Comments

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

Open
ZeroIntensity wants to merge 5 commits intopython:mainfrom
ZeroIntensity:document-pyerr-checksignals-change
Open

gh-144748: Document 3.12 and 3.14 changes to PyErr_CheckSignals#144982
ZeroIntensity wants to merge 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip news topic-C-API

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants