diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-12-04 19:58:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-04 19:58:31 (GMT) |
commit | e699e5c20fc495952905597edfa82de0c1848f8c (patch) | |
tree | 1be944629ed9854a163b6050bef883a7caa60ab3 /Misc/NEWS.d | |
parent | ac781282712ab39cd6339e3c780c11e0027d22ab (diff) | |
download | cpython-e699e5c20fc495952905597edfa82de0c1848f8c.zip cpython-e699e5c20fc495952905597edfa82de0c1848f8c.tar.gz cpython-e699e5c20fc495952905597edfa82de0c1848f8c.tar.bz2 |
gh-98458: unittest: bugfix for infinite loop while handling chained exceptions that contain cycles (GH-98459)
* Bugfix addressing infinite loop while handling self-referencing chained exception in TestResult._clean_tracebacks()
* Bugfix extended to properly handle exception cycles in _clean_tracebacks. The "seen" set follows the approach used in the TracebackException class (thank you @iritkatriel for pointing it out)
* adds a test for a single chained exception that holds a self-loop in its __cause__ and __context__ attributes
(cherry picked from commit 72ec518203c3f3577a5e888b12f10bb49060e6c2)
Co-authored-by: AlexTate <0xalextate@gmail.com>
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Library/2022-10-19-18-31-53.gh-issue-98458.vwyq7O.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2022-10-19-18-31-53.gh-issue-98458.vwyq7O.rst b/Misc/NEWS.d/next/Library/2022-10-19-18-31-53.gh-issue-98458.vwyq7O.rst new file mode 100644 index 0000000..f74195c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-10-19-18-31-53.gh-issue-98458.vwyq7O.rst @@ -0,0 +1 @@ +Fix infinite loop in unittest when a self-referencing chained exception is raised |