[issue4486] Exception traceback is incorrect for strange exception handling

2009-11-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Finally committed in py3k and 3.1. Thanks! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 3.0 ___ Python tracker _

[issue4486] Exception traceback is incorrect for strange exception handling

2009-11-18 Thread Nick Coghlan
Nick Coghlan added the comment: Reviewed patch diff - looks good to me. It's an obscure corner case, but the patch is pretty straightforward so we may as well clean it up. -- ___ Python tracker

[issue4486] Exception traceback is incorrect for strange exception handling

2009-05-29 Thread R. David Murray
Changes by R. David Murray : -- assignee: barry -> versions: +Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list maili

[issue4486] Exception traceback is incorrect for strange exception handling

2008-12-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. Should it go in? -- keywords: +needs review, patch stage: -> patch review type: -> behavior Added file: http://bugs.python.org/file12366/issue4486.patch ___ Python tracker

[issue4486] Exception traceback is incorrect for strange exception handling

2008-12-02 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: Looks to me like the display code is getting confused by the lack of a non-None __context__ on the KeyError. Perhaps the "raise ex from cause" syntax should be setting the __context__ on the "cause" exception if it isn't already set? Or else w

[issue4486] Exception traceback is incorrect for strange exception handling

2008-12-02 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: Note that the display is correct in the case where the chaining is "right", i.e.: try: raise IOError except: try: raise KeyError except Exception as ex: raise AttributeError from ex In that case, IOError is correctly flagged as t

[issue4486] Exception traceback is incorrect for strange exception handling

2008-12-02 Thread Barry A. Warsaw
Barry A. Warsaw <[EMAIL PROTECTED]> added the comment: This looks like it only affects printing exceptions with implicit chaining when the exception propagates to the top level. (Maybe it also affects the traceback module?) In that case, I agree with Antoine. Let's fix it in 3.0.1. --

[issue4486] Exception traceback is incorrect for strange exception handling

2008-12-02 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: The current behaviour is the result of how I interpreted the error reporting specification in PEP 3134. See "Enhanced Reporting" in http://www.python.org/dev/peps/pep-3134/ . I may have misinterpreted it, in that both the cause and the context

[issue4486] Exception traceback is incorrect for strange exception handling

2008-12-02 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: Such a bizarre corner case probably isn't an actual release blocker, but I'm setting it as such so that Barry can make that call explicitly before the final 3.0 release. -- assignee: -> barry nosy: +barry priority: -> release blocker

[issue4486] Exception traceback is incorrect for strange exception handling

2008-12-02 Thread Nick Coghlan
New submission from Nick Coghlan <[EMAIL PROTECTED]>: The interactive interpreter doesn't appear to like it if __cause__ and __context__ are both set on the current exception. = >>> try: ... raise IOError ... except: ... raise AttributeError from KeyError ... KeyError The ab