On __exit__(), the 3rd argument "exc_value" should contain the instance of the exception. But in most cases, it contains only the string representation of the exception. See attached test case. Same behavior for KeyError, AttributeError, RuntimeError, ...
BTW, I'm not going to backport this fix, since the implementation does carry over well to 2.6. Additionally, it is probably an unacceptable change of behavior in a bug fix release.
History
Date
User
Action
Args
2022-04-11 14:56:57
admin
set
github: 52101
2010-02-06 02:03:18
benjamin.peterson
set
messages: +
2010-02-05 02:12:53
benjamin.peterson
set
status: open -> closedresolution: fixedmessages: +