GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||
GeezerVison is showing github.com — bpo-36829: Document test.support.catch_unraisable_exception() by vstinner · Pull Request #13554 · python/cpython Conversation
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Might be worth suggesting gc.collect()
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
gc.collect() is not needed. Why do you want to force a GC collection?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It's not needed but it's often a good trigger of these sort of exceptions
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Well, tests using the context manager expect an unraisable exception and fail if it's not the case.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Oh. By the way. I also had the idea of installing a custom sys.unraisablehook in regrtest and repeat all errors at exit. Maybe even make the test fail if at least one unraisable exception is logged.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can you URL me to that commit?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It's not a commit but an idea :-) I didn't implement it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ok, :$ ping me when implemented!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh. "del self.unraisable" was a good idea. I only used the context manager in a few places, but I already get it wrong in test_io :-) It's now fixed by this PR! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
catch_unraisable_exception() now also removes its 'unraisable' attribute at the context manager exit.
|
@tirkarthi @graingert: Would you mind to review the updated PR? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@graingert: Thanks for your very good feedback, it's very valuable! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…GH-13554) catch_unraisable_exception() now also removes its 'unraisable' attribute at the context manager exit.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.