classification
Title: PyErr_WriteUnraisable should be more verbose in Python 2.7
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: christian.aguilera@foundry.com, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2017-07-24 14:48 by christian.aguilera@foundry.com, last changed 2020-02-26 18:54 by serhiy.storchaka. This issue is now closed.

Files
File name Uploaded Description Edit
PyErr_WriteUnraisable.patch christian.aguilera@foundry.com, 2017-07-24 14:48
Messages (2)
msg298979 - (view) Author: Christian Aguilera (christian.aguilera@foundry.com) Date: 2017-07-24 14:48
When an exception is raised in a __del__ method or a finalizer (i.e. a
weakref callback), only the exception name is printed out.

Unfortunately, arbitrarily complex code can be involved which makes
debugging quite tedious. It would be nice to display the full traceback,
so that these errors are easier to diagnose.

The same bug was reported in the past, but it was fixed for Python 3.3 onwards.

Since it is trivial to get this fix in Python 2.7, I'm adding the patch for it here.
msg362711 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-02-26 18:54
It is too late for 2.7.
History
Date User Action Args
2020-02-26 18:54:50serhiy.storchakasetstatus: open -> closed

nosy: + serhiy.storchaka
messages: + msg362711

resolution: wont fix
stage: resolved
2017-07-24 14:48:28christian.aguilera@foundry.comcreate