Author vstinner
Recipients ZackerySpytz, graingert, matrixise, serhiy.storchaka, vstinner
Date 2019-05-09.21:58:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557439099.06.0.80734286972.issue36829@roundup.psfhosted.org>
In-reply-to
Content
too_late_unraisable.py is an example where PyErr_WriteUnraisable() is called very lated during Python finalization to be handled by user code. A destructor (__del__) fails on print() because the stream has been closed.

PyErr_WriteUnraisable() is called by _PyGC_CollectNoFail() at the *end* of PyImport_Cleanup(). At this point, the sys module has already been cleared, as all other modules. A custom sys.unraisablehook cannot be used, because sys has been called.
History
Date User Action Args
2019-05-09 21:58:19vstinnersetrecipients: + vstinner, serhiy.storchaka, graingert, matrixise, ZackerySpytz
2019-05-09 21:58:19vstinnersetmessageid: <1557439099.06.0.80734286972.issue36829@roundup.psfhosted.org>
2019-05-09 21:58:19vstinnerlinkissue36829 messages
2019-05-09 21:58:18vstinnercreate