Skip to content

Fix traceback fallback for ExceptionGroup subclasses - #78

Open
fly1d wants to merge 1 commit into
cknd:masterfrom
fly1d:fix/exception-group-subclasses
Open

fly1d wants to merge 1 commit into
cknd:masterfrom
fly1d:fix/exception-group-subclasses

Conversation

@fly1d

@fly1d fly1d commented Oct 30, 2026

Copy link
Copy Markdown

ExceptionGroup subclasses bypass the existing standard-library fallback because the guard compares the exact class name. Their formatted output loses nested exception details and keeps only the outer message and count.

Check against the builtin ExceptionGroup type, with an empty-tuple fallback when that builtin is unavailable. Keep the existing standard traceback rendering. The appended public-API tests cover subclass instances, exc_info tuples and a traceback-bearing subclass, plus ordinary group and exception controls. This extends the fallback from #66; it does not change direct BaseException dispatch in #77.

On Python 3.14.7/macOS arm64, the same final fixture gives 3 failed/11 passed with pristine code and 14 passed with the fix. The CI fatal flake8 selection, syntax and diff checks pass. The advisory --exit-zero lint reports 238 findings on both versions, with none in the added test lines. Older Python versions and other platforms were not run; group tests skip when the builtin is unavailable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant