-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
on __exit__(), exc_value does not contain the exception. #52101
Comments
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. |
Indeed, it seems the exception isn't always normalized. |
Has this behavior changed between 2.6 and 2.7? |
No, it's also in 2.6. |
Patch. |
Fixed in r77983. |
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. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: