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: Support display of both __cause__ and __context__
Type: enhancement Stage: needs patch
Components: Interpreter Core, Library (Lib) Versions: Python 3.3
process
Status: open Resolution:
Dependencies: 14133 Superseder:
Assigned To: Nosy List: Arfrever, cvrebert, isoschiz, meador.inge, ncoghlan, pjenvey, poke, serhiy.storchaka
Priority: normal Keywords:

Created on 2012-05-14 12:00 by ncoghlan, last changed 2022-04-11 14:57 by admin.

Messages (3)
msg160609 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2012-05-14 12:00
With PEP 415 accepted as the implementation of the "raise exc from None" syntax, it raises the prospect of exceptions with both __cause__ and __context__ set to non-None values, and __suppress_context__ set to False.

The initial PEP 415 patch treats this case the same way PEP 409 did: it ignores __context__ if *either* __cause__ is not None *or* __suppress_context__ is True.

This issue proposes that at least the default exception display routine and the display routine in the traceback module be updated to display the __context__ any time __suppress_context__ is False, even if __cause__ is also non-None.
msg187446 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-04-20 17:57
And don't forget about print_exception() in Lib/idlelib/run.py.
msg187451 - (view) Author: Philip Jenvey (pjenvey) * (Python committer) Date: 2013-04-20 19:16
and the code module (after #17442 is resolved)
History
Date User Action Args
2022-04-11 14:57:30adminsetgithub: 59010
2013-04-20 19:16:46pjenveysetnosy: + pjenvey
messages: + msg187451
2013-04-20 17:57:07serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg187446
2013-04-19 22:14:07isoschizsetnosy: + isoschiz
2012-06-04 23:20:08meador.ingesetnosy: + meador.inge
2012-05-15 08:56:21pokesetnosy: + poke
2012-05-15 02:38:48cvrebertsetnosy: + cvrebert
2012-05-15 00:01:49Arfreversetnosy: + Arfrever
2012-05-14 12:12:23ncoghlansetdependencies: + improved PEP 409 implementation
2012-05-14 12:00:38ncoghlancreate