]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-131117: Update tp_finalize example to use PyErr_GetRaisedException (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 19 Mar 2025 17:34:15 +0000 (18:34 +0100)
committerGitHub <noreply@github.com>
Wed, 19 Mar 2025 17:34:15 +0000 (17:34 +0000)
commit69db2ebfce88f30275b3cd392661f4611836c315
treeeff59c34a0964554495060cffa3b2a0154efb8ec
parent12227223d13bcb06ea9edd8794f8d058ceb0ea4e
[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>
Doc/c-api/typeobj.rst