cpython/Misc/NEWS.d/next/C_API/2024-07-03-13-39-13.gh-issue-121058.MKi1MV.rst

``PyThreadState_Clear()`` now warns (and calls ``sys.excepthook``) if the
thread state still has an active exception.