[issue6210] Exception Chaining missing method for suppressing context

Nick Coghlan report at bugs.python.org
Tue Feb 7 14:52:45 CET 2012


Nick Coghlan <ncoghlan at gmail.com> added the comment:

I started work on integrating this into 3.3 this evening, but ran into too many issues to finish it.

Problems found and fixed:
- traceback.py displayed the wrong exception (test added and impl fixed)

Additional changes:
- eliminated duplicate code paths for __cause__ validation in ceval.c and exceptions.c (latter now exposes a private C API for ceval to use)
- documented that Ellipsis may be used as a sentinel when None is not appropriate
- broke up the long test case in test_exceptions a bit
- started a placeholder section in What's New

Remaining problems:
- default sys.excepthook implementation currently does the wrong thing
- needs a test for the pythonrun display logic (test_cmd_line_script would be the appropriate place)
- testCauseSyntax test should probably be in test_raise, not test_exceptions

Off the top of my head, I'm not even sure where the default sys.excepthook impl even *lives*. Making that behave itself is the major blocker at this point, though (followed by a test for the pythonrun change - given the problem in traceback.py, it may be that it's this code that's buggy and it's affecting the interactive interpreter as well).

(I deliberately haven't added a NEWS entry yet - that's best left until last, since it's a major cause of merge conflicts otherwise)

----------
Added file: http://bugs.python.org/file24444/pep409_interactive_broken.diff

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


More information about the Python-bugs-list mailing list