bpo-25782: avoid hang in PyErr_SetObject when current exception has a cycle in its context chain (GH-27626)


Co-authored-by: Dennis Sweeney 36520290+sweeneyde@users.noreply.github.com
(cherry picked from commit d5c217475c4957a8084ac3f92ae012ece5edc7cb)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 files changed