gh-141732: Fix `ExceptionGroup` repr changing when original exception sequence is mutated by dr-carlos · Pull Request #141736 · python/cpython
added 5 commits
iritkatriel pushed a commit that referenced this pull request
thunze added a commit to thunze/nixpkgs that referenced this pull request
CPython fixed python/cpython#141732 in python/cpython#141736, but exceptiongroup 1.3.1, including its test suite, still matches the old repr behavior. The CPython fix has only been backported to 3.13 so far, where it was first included in version 3.13.12, so we only need to patch for 3.13 and 3.15+.
thunze added a commit to thunze/nixpkgs that referenced this pull request
CPython fixed python/cpython#141732 in python/cpython#141736, but exceptiongroup 1.3.1, including its test suite, still matches the old repr behavior. The CPython fix has only been backported to 3.13 so far, where it was first included in version 3.13.12, so we only need to patch for 3.13 and 3.15+.
worksbyfriday added a commit to worksbyfriday/exceptiongroup that referenced this pull request
…mutated Store a string representation of exceptions at creation time (_exceptions_str) and use it in __repr__ instead of self.args[1], which reflects mutations to the original mutable sequence. This mirrors the CPython fix (python/cpython#141736) which was backported to Python 3.13.12+. The test is version-conditional: on Python < 3.11 (using the backport), it expects the fixed behavior; on 3.11+ (using the builtin), it expects the behavior of that specific CPython version. Fixes agronholm#154. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ambv added a commit that referenced this pull request
thunze added a commit to thunze/nixpkgs that referenced this pull request
[1] was finally backported to CPython 3.14 in [2], which landed in CPython 3.14.4, causing the build of `python314Packages.exceptiongroup` to fail. In the meantime, exceptiongroup fixed `BaseExceptionGroup.__repr__` on their end to match CPython behavior [3], so we can use that patch instead. [1] python/cpython#141736 [2] python/cpython#144445 [3] agronholm/exceptiongroup#155
thunze added a commit to thunze/nixpkgs that referenced this pull request
[1] was finally backported to CPython 3.14 in [2], which landed in CPython 3.14.4, causing the build of `python314Packages.exceptiongroup` to fail. In the meantime, exceptiongroup fixed `BaseExceptionGroup.__repr__` on their end to match CPython behavior [3], so we can use that patch instead. [1] python/cpython#141736 [2] python/cpython#144445 [3] agronholm/exceptiongroup#155
mweinelt pushed a commit to mweinelt/nixpkgs that referenced this pull request
[1] was finally backported to CPython 3.14 in [2], which landed in CPython 3.14.4, causing the build of `python314Packages.exceptiongroup` to fail. In the meantime, exceptiongroup fixed `BaseExceptionGroup.__repr__` on their end to match CPython behavior [3], so we can use that patch instead. [1] python/cpython#141736 [2] python/cpython#144445 [3] agronholm/exceptiongroup#155
mweinelt pushed a commit to mweinelt/nixpkgs that referenced this pull request
[1] was finally backported to CPython 3.14 in [2], which landed in CPython 3.14.4, causing the build of `python314Packages.exceptiongroup` to fail. In the meantime, exceptiongroup fixed `BaseExceptionGroup.__repr__` on their end to match CPython behavior [3], so we can use that patch instead. [1] python/cpython#141736 [2] python/cpython#144445 [3] agronholm/exceptiongroup#155
mweinelt pushed a commit to mweinelt/nixpkgs that referenced this pull request
[1] was finally backported to CPython 3.14 in [2], which landed in CPython 3.14.4, causing the build of `python314Packages.exceptiongroup` to fail. In the meantime, exceptiongroup fixed `BaseExceptionGroup.__repr__` on their end to match CPython behavior [3], so we can use that patch instead. [1] python/cpython#141736 [2] python/cpython#144445 [3] agronholm/exceptiongroup#155
mweinelt pushed a commit to mweinelt/nixpkgs that referenced this pull request
[1] was finally backported to CPython 3.14 in [2], which landed in CPython 3.14.4, causing the build of `python314Packages.exceptiongroup` to fail. In the meantime, exceptiongroup fixed `BaseExceptionGroup.__repr__` on their end to match CPython behavior [3], so we can use that patch instead. [1] python/cpython#141736 [2] python/cpython#144445 [3] agronholm/exceptiongroup#155
mweinelt pushed a commit to mweinelt/nixpkgs that referenced this pull request
[1] was finally backported to CPython 3.14 in [2], which landed in CPython 3.14.4, causing the build of `python314Packages.exceptiongroup` to fail. In the meantime, exceptiongroup fixed `BaseExceptionGroup.__repr__` on their end to match CPython behavior [3], so we can use that patch instead. [1] python/cpython#141736 [2] python/cpython#144445 [3] agronholm/exceptiongroup#155
salva09 pushed a commit to salva09/nixpkgs that referenced this pull request
[1] was finally backported to CPython 3.14 in [2], which landed in CPython 3.14.4, causing the build of `python314Packages.exceptiongroup` to fail. In the meantime, exceptiongroup fixed `BaseExceptionGroup.__repr__` on their end to match CPython behavior [3], so we can use that patch instead. [1] python/cpython#141736 [2] python/cpython#144445 [3] agronholm/exceptiongroup#155