Skip to content

[3.13] gh-131117: Update tp_finalize example to use PyErr_GetRaisedException (GH-131118) - #131476

Merged
vstinner merged 1 commit into
python:3.13from
miss-islington:backport-a4832f6-3.13
Mar 19, 2025
Merged

vstinner merged 1 commit into
python:3.13from
miss-islington:backport-a4832f6-3.13

Conversation

@miss-islington

@miss-islington miss-islington commented Mar 19, 2025 •

Copy link
Copy Markdown
Contributor

The tp_finalize C API doc used PyErr_Fetch() and PyErr_Restore() in
its example code. That API was deprecated in 3.12.

Update to point to the suggested replacement function
PyErr_GetRaisedException() which has a sample usage.
(cherry picked from commit a4832f6)

Co-authored-by: Cody Maloney cmaloney@users.noreply.github.com


📚 Documentation preview 📚: https://cpython-previews--131476.org.readthedocs.build/

…eption (pythonGH-131118)

The tp_finalize C API doc used PyErr_Fetch() and PyErr_Restore() in
its example code. That API was deprecated in 3.12.

Update to point to the suggested replacement function
PyErr_GetRaisedException() which has a sample usage.
(cherry picked from commit a4832f6)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants