-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-46025: Fix a crash in the atexit module for auto-unregistering functions #30002
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
Conversation
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Christian Heimes <[email protected]>
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.
LGTM. Thanks, I'm feeling more confident with catch_unraisable_exception.
I'm surprised that no other atexit uses catch_unraisable_exception.
atexit._run_exitfuncs() | ||
self.assertEqual(cm.unraisable.object, func) | ||
self.assertEqual(cm.unraisable.exc_type, ZeroDivisionError) | ||
self.assertEqual(type(cm.unraisable.exc_value), ZeroDivisionError) |
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.
Not sure if checking exc_value is needed, but it's ok to test it :-)
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.
This makes it a military-grade test :)
@pablogsal: Status check is done, and it's a failure ❌ . |
1 similar comment
@pablogsal: Status check is done, and it's a failure ❌ . |
Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
GH-30005 is a backport of this pull request to the 3.10 branch. |
…nctions (pythonGH-30002) (cherry picked from commit f0d290d) Co-authored-by: Pablo Galindo Salgado <[email protected]>
…nctions (GH-30002) (GH-30005) (cherry picked from commit f0d290d) Co-authored-by: Pablo Galindo Salgado <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]>
Thanks for the fix ;-) |
https://bugs.python.org/issue46025