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: sys.excepthook doesn't receive the traceback when called from code.InteractiveInterpreter
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Claudiu.Popa, r.david.murray
Priority: normal Keywords: patch

Created on 2014-09-30 11:28 by Claudiu.Popa, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
code_excepthook_traceback.patch Claudiu.Popa, 2014-09-30 11:28 review
Messages (3)
msg227881 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2014-09-30 11:28
It seems that sys.excepthook doesn't receive the traceback when an error occurs during a code.InteractiveInterpreter run. The problem is here: https://hg.python.org/cpython/file/5ade1061fa3d/Lib/code.py#l168. last_tb was previously set to None right before. The attached patch passes sys.last_traceback to sys.excepthook.
msg234187 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2015-01-17 18:14
Ping. :-)
msg237475 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2015-03-07 20:32
This was fixed by a different patch in https://hg.python.org/cpython/rev/5f3dd0a2b1ab
History
Date User Action Args
2022-04-11 14:58:08adminsetgithub: 66712
2015-03-07 20:32:11Claudiu.Popasetstatus: open -> closed
resolution: fixed
messages: + msg237475

stage: patch review -> resolved
2015-01-17 18:14:48Claudiu.Popasetmessages: + msg234187
2014-10-09 18:37:24Claudiu.Popasetstage: patch review
2014-09-30 11:28:59Claudiu.Popacreate