]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-131117: Update tp_finalize example to use PyErr_GetRaisedException (#131118)
authorCody Maloney <cmaloney@users.noreply.github.com>
Wed, 19 Mar 2025 17:27:55 +0000 (10:27 -0700)
committerGitHub <noreply@github.com>
Wed, 19 Mar 2025 17:27:55 +0000 (18:27 +0100)
commita4832f6b9a62771725b159bc7cd6c49fb45e3bc8
treefff7c6e63f09b529236a5f938e71156e2e96cd55
parent5c44d7d99c470b4270b2f0e4841cf5a7f2499e15
gh-131117: Update tp_finalize example to use PyErr_GetRaisedException (#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.
Doc/c-api/typeobj.rst