[New-bugs-announce] [issue31015] PyErr_WriteUnraisable should be more verbose in Python 2.7

Christian Aguilera report at bugs.python.org
Mon Jul 24 10:48:28 EDT 2017


New submission from Christian Aguilera:

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.

----------
components: Library (Lib)
files: PyErr_WriteUnraisable.patch
keywords: patch
messages: 298979
nosy: christian.aguilera at foundry.com
priority: normal
severity: normal
status: open
title: PyErr_WriteUnraisable should be more verbose in Python 2.7
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file47038/PyErr_WriteUnraisable.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31015>
_______________________________________


More information about the New-bugs-announce mailing list