I also added a versionchanged to PyObject_Str and a note in the Porting section of What's New, as third party extensions could also be affected by this change - it elevates "may silently discard an active exception" to "debug build assertion failure".

"I also added a versionchanged to PyObject_Str and a note in the Porting section of What's New, as third party extensions could also be affected by this change - it elevates "may silently discard an active exception" to "debug build assertion failure"."
Hi, I added this check in many other functions: PyEval_EvalFrameEx(), PyEval_CallObjectWithKeywords(), PyObject_Repr(), PyObject_Str(). And also private methods like type_call().
I added these assertions when I worked on #18408 to ensure that MemoryError exceptions are no more ignored.

Above commits added notes for the other two currently documented public APIs directly affected by the change (PyEval_CallObjectWithKeywords isn't currently documented, despite the public name), and also updated the porting note to clarify that these operations may be invoked indirectly via other public APIs.