Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
gh-99181: fix except* on unhashable exceptions#99192
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
bedevere-bot commentedNov 7, 2022
🤖 New build scheduled with the buildbot fleet by@iritkatriel for commit47842ab 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
bedevere-bot commentedNov 7, 2022
🤖 New build scheduled with the buildbot fleet by@iritkatriel for commit9f8a78d 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Using the ids here seems safe because they are used only while the code holds a reference to the BaseExceptionGroup object and that object is immutable, so there's no chance that the ids will get reused while the code is running.
Thanks@iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
(cherry picked from commitc43714f)Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
bedevere-bot commentedNov 8, 2022
GH-99243 is a backport of this pull request to the3.11 branch. |
Uh oh!
There was an error while loading.Please reload this page.
Fixes#99181.
The fix is for the internal split/merge that except* uses to be based on a set of the IDs of the exceptions rather than a set of the exception objects themselves. This also protects against exceptions with crazy
__eq__
implementations (the new tests check for this too).TypeError
whenexcept*
catches an unhashable exception #99181