FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-46025: Fix a crash in the atexit module for auto-unregistering functions by pablogsal · Pull Request #30002 · python/cpython · GitHub

Repository navigation

bpo-46025: Fix a crash in the atexit module for auto-unregistering functions - #30002

Merged
pablogsal merged 3 commits into
python:mainfrom
pablogsal:bpo-46025
Dec 9, 2021
Merged

pablogsal merged 3 commits into
python:mainfrom
pablogsal:bpo-46025

Conversation

pablogsal commented Dec 9, 2021 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Comment thread Modules/atexitmodule.c Outdated
Comment thread Lib/test/_test_atexit.py Outdated
Comment thread Modules/atexitmodule.c Outdated
pablogsal and others added 2 commits December 9, 2021 13:16
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Christian Heimes <christian@python.org>

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. Thanks, I'm feeling more confident with catch_unraisable_exception.

I'm surprised that no other atexit uses catch_unraisable_exception.

Comment thread Lib/test/_test_atexit.py
atexit._run_exitfuncs()
self.assertEqual(cm.unraisable.object, func)
self.assertEqual(cm.unraisable.exc_type, ZeroDivisionError)
self.assertEqual(type(cm.unraisable.exc_value), ZeroDivisionError)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Not sure if checking exc_value is needed, but it's ok to test it :-)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This makes it a military-grade test :)

Copy link
Copy Markdown
Contributor

@pablogsal: Status check is done, and it's a failure ❌ .

1 similar comment

Copy link
Copy Markdown
Contributor

@pablogsal: Status check is done, and it's a failure ❌ .

pablogsal merged commit f0d290d into python:main Dec 9, 2021
pablogsal deleted the bpo-46025 branch December 9, 2021 13:53

Copy link
Copy Markdown
Contributor

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

Copy link
Copy Markdown

GH-30005 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 9, 2021
…nctions (pythonGH-30002)

(cherry picked from commit f0d290d)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
pablogsal added a commit that referenced this pull request Dec 9, 2021
…nctions (GH-30002) (GH-30005)

(cherry picked from commit f0d290d)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

vstinner commented Dec 9, 2021

Copy link
Copy Markdown
Member

Thanks for the fix ;-)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

6 participants


Back | FazBrowse Home | New Git URL