Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subgroup is omitted from rendering when in a loop with its parent group #35

Closed
gschaffner opened this issue Oct 27, 2022 · 0 comments · Fixed by #34
Closed

Subgroup is omitted from rendering when in a loop with its parent group #35

gschaffner opened this issue Oct 27, 2022 · 0 comments · Fixed by #34
Labels
bug Something isn't working

Comments

@gschaffner
Copy link

To reproduce (tested on CPython 3.9 and 3.10):

e0 = Exception("e0")
eg0 = ExceptionGroup("eg0", (e0,))
eg1 = ExceptionGroup("eg1", (eg0,))

raise eg0 from eg1

gives

  | exceptiongroup.ExceptionGroup: eg1 (1 sub-exception)

The above exception was the direct cause of the following exception:

  + Exception Group Traceback (most recent call last):
  |   File "/home/ganden/vc/exceptiongroup/eg.py", line 7, in <module>
  |     raise eg0 from eg1
  | exceptiongroup.ExceptionGroup: eg0 (1 sub-exception)
  +-+---------------- 1 ----------------
    | Exception: e0
    +------------------------------------

This differs from the expected 3.11 behavior.

@agronholm agronholm added the bug Something isn't working label Oct 27, 2022
agronholm added a commit that referenced this issue Oct 27, 2022
agronholm added a commit that referenced this issue Oct 27, 2022
agronholm added a commit that referenced this issue Oct 27, 2022
* Fixed AttributeError when rendering an excgroup as a cause for another exception

Fixes #33.

* Added an extra test for EG loop rendering

Closes #35.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants