bpo-24048: Save the live exception during import.c's remove_module()#13005
Conversation
Save the live exception during the course of remove_module().
vstinner
left a comment
There was a problem hiding this comment.
LGTM. But maybe the NEWS entry to explain what was the problem rathe than explaining the fix.
|
Any reason you didn't merge, @vstinner ? |
| return; | ||
| } | ||
| Py_FatalError("import: deleting existing key in " | ||
| "sys.modules failed"); |
There was a problem hiding this comment.
By the way, it would be nice to chain the two exceptions rather than calling the nasty Py_FatalError() function :-(
|
Thanks @ZackerySpytz for the PR, and @ncoghlan for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
|
Thanks @ZackerySpytz for the PR, and @ncoghlan for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6. |
|
Thanks @ZackerySpytz for the PR, and @ncoghlan for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
|
GH-20521 is a backport of this pull request to the 3.7 branch. |
|
Sorry, @ZackerySpytz and @ncoghlan, I could not cleanly backport this to |
|
Sorry @ZackerySpytz and @ncoghlan, I had trouble checking out the |
…ythonGH-13005) Save the live exception during the course of remove_module(). (cherry picked from commit 94a64e9) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
Save the live exception during the course of remove_module().
https://bugs.python.org/issue24048