This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients gregory.p.smith, izbyshev, jbms, vstinner
Date 2021-09-24.11:31:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632483088.03.0.57730043918.issue42969@roundup.psfhosted.org>
In-reply-to
Content
Another example where a developer asks to call abort() to notice bugs, whereas Python previously silently ignored it: bpo-36829. Calling abort() is a legit use case, but not really the best default behavior. Again, the problem was solved by letting developers setting their own callback: sys.unraisablehook.

If I understood correctly, pytest doesn't override it but "took" into the default implementation: it chains its own code with the default implementation. It's possible because there is a way to "get" the current hook: just read sys.unraisablehook ;-)

Another argument in favor of also adding Py_GetThreadExitCallback() ;-)
History
Date User Action Args
2021-09-24 11:31:28vstinnersetrecipients: + vstinner, gregory.p.smith, izbyshev, jbms
2021-09-24 11:31:28vstinnersetmessageid: <1632483088.03.0.57730043918.issue42969@roundup.psfhosted.org>
2021-09-24 11:31:28vstinnerlinkissue42969 messages
2021-09-24 11:31:27vstinnercreate