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.

classification
Title: Call sys.except_hook if exception occurs in __del__
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.2
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Display full tracebacks when an error occurs asynchronously
View: 7317
Assigned To: Nosy List: BreamoreBoy, jpe, r.david.murray
Priority: normal Keywords:

Created on 2007-03-30 15:49 by jpe, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg55052 - (view) Author: John Ehresman (jpe) * Date: 2007-03-30 15:49
Is there a reason why sys.except_hook isn't called when __del__ returns with an exception?  If not, I can write a patch to call sys.except_hook from PyErr_WriteUnraisable.  The default of printing the full traceback should be possible in many situations.  
msg109837 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-10 09:53
Please provide a patch.
msg184516 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-03-18 20:39
Re-reported and fixed in issue 7317.
History
Date User Action Args
2022-04-11 14:56:23adminsetgithub: 44788
2013-03-18 20:39:04r.david.murraysetstatus: open -> closed

superseder: Display full tracebacks when an error occurs asynchronously

nosy: + r.david.murray
messages: + msg184516
resolution: duplicate
stage: test needed -> resolved
2010-07-10 09:53:22BreamoreBoysetnosy: + BreamoreBoy

messages: + msg109837
versions: + Python 3.2, - Python 3.1, Python 2.7
2009-03-30 17:03:47ajaksu2setstage: test needed
versions: + Python 3.1, Python 2.7, - Python 2.6
2007-03-30 15:49:23jpecreate