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

bpo-36829: Add a -X option to abort in PyErr_WriteUnraisable() by ZackerySpytz · Pull Request #13175 · python/cpython · GitHub

/ cpython Public

bpo-36829: Add a -X option to abort in PyErr_WriteUnraisable() - #13175

Closed
ZackerySpytz wants to merge 1 commit into
python:masterfrom
ZackerySpytz:bpo-36829-X-option-PyErr_WriteUnraisable
Closed

bpo-36829: Add a -X option to abort in PyErr_WriteUnraisable()#13175
ZackerySpytz wants to merge 1 commit into
python:masterfrom
ZackerySpytz:bpo-36829-X-option-PyErr_WriteUnraisable

Conversation

ZackerySpytz commented May 7, 2019
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

Add a -X command-line option to abort the current process
if PyErr_WriteUnraisable() is called.

https://bugs.python.org/issue36829

Add a -X command-line option to abort the current process
if PyErr_WriteUnraisable() is called.

Copy link
Copy Markdown
Member

Hi @ZackerySpytz

Do you think you could add a test?

vstinner commented May 7, 2019

Copy link
Copy Markdown
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?

Copy link
Copy Markdown
Contributor

@vstinner PyErr_WriteUnraisable can get called during __del__ or GC so most of the python environment could have already been deleted by the time the hook is called,

Or the hook could be called after the hook is removed by GC and then we're back to the same problem

Copy link
Copy Markdown
Member

I merged my PR #13187 instead, so I reject this PR. See https://bugs.python.org/issue36829#msg343201 for the rationale.

vstinner closed this May 22, 2019
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL