bpo-36829: Add a -X option to abort in PyErr_WriteUnraisable()#13175
Closed
ZackerySpytz wants to merge 1 commit intopython:masterfrom
Closed
bpo-36829: Add a -X option to abort in PyErr_WriteUnraisable()#13175ZackerySpytz wants to merge 1 commit intopython:masterfrom
ZackerySpytz wants to merge 1 commit intopython:masterfrom
Conversation
Add a -X command-line option to abort the current process if PyErr_WriteUnraisable() is called.
Member
|
Do you think you could add a test? |
Member
|
I am not sure I like this feature. Would it make sense to add a callback instead, like sys.excepthook? The callback could log the error, do nothing, abort the process, call the police, etc. It might be more general, no? |
Contributor
|
@vstinner PyErr_WriteUnraisable can get called during Or the hook could be called after the hook is removed by GC and then we're back to the same problem |
Member
|
I merged my PR #13187 instead, so I reject this PR. See https://bugs.python.org/issue36829#msg343201 for the rationale. |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a -X command-line option to abort the current process
if PyErr_WriteUnraisable() is called.
https://bugs.python.org/issue36829