SIGN IN SIGN UP

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

gh-131117: Update tp_finalize example to use PyErr_GetRaisedException (GH-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 a4832f6b9a62771725b159bc7cd6c49fb45e3bc8)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
M
Miss Islington (bot) committed
69db2ebfce88f30275b3cd392661f4611836c315
Parent: 1222722
Committed by GitHub <noreply@github.com> on 3/19/2025, 5:34:15 PM