Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jan 24, 2020

collect() should not get an exception, but it does, logging the
exception is enough. Override sys.unraisablehook to decide how to
handle unraisable exceptions.

Py_FatalError() should be avoided whenever possible.

https://bugs.python.org/issue38631

collect() should not get an exception, but it does, logging the
exception is enough. Override sys.unraisablehook to decide how to
handle unraisable exceptions.

Py_FatalError() should be avoided whenever possible.
@vstinner
Copy link
Member Author

I don't think that a NEWS entry is needed, since an exception in collect() "should not happen" :-) This change is more a cleanup ;-)

Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

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

LGTM

@vstinner vstinner merged commit 656c45e into python:master Jan 24, 2020
@vstinner vstinner deleted the gc_fatal_error branch January 24, 2020 17:05
@vstinner
Copy link
Member Author

Thanks for the review.

shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
collect() should not get an exception, but it does, logging the
exception is enough. Override sys.unraisablehook to decide how to
handle unraisable exceptions.

Py_FatalError() should be avoided whenever possible.
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.

4 participants