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

break cycle in chained exceptions #1540

Merged
merged 1 commit into from
May 12, 2019
Merged

break cycle in chained exceptions #1540

merged 1 commit into from
May 12, 2019

Conversation

davidism
Copy link
Member

closes #1536

The traceback formatter followed exc_value.__context__ infinitely, even if there was a cycle. Add a memo set to track what's been seen already and break when it detects a cycle.

@davidism davidism added this to the 0.15.3 milestone May 12, 2019
@davidism davidism merged commit bdc17e4 into 0.15.x May 12, 2019
@davidism davidism deleted the break-tb-cycle branch May 12, 2019 14:55
while True:
self.groups.append(Group(exc_type, exc_value, tb))
memo.add(exc_value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this assumes hashability of exceptions (which isn't always true), I wrote a fix for this: #1542

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants