Message342000
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. |
|
Date |
User |
Action |
Args |
2019-05-09 21:58:19 | vstinner | set | recipients:
+ vstinner, serhiy.storchaka, graingert, matrixise, ZackerySpytz |
2019-05-09 21:58:19 | vstinner | set | messageid: <1557439099.06.0.80734286972.issue36829@roundup.psfhosted.org> |
2019-05-09 21:58:19 | vstinner | link | issue36829 messages |
2019-05-09 21:58:18 | vstinner | create | |
|