Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.5] bpo-29692: contextlib.contextmanager may incorrectly unchain Ru… #1107

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

Merged
merged 1 commit into from
Apr 13, 2017

Conversation

Mariatta
Copy link
Member

…ntimeError (GH-949)

contextlib._GeneratorContextManager.exit includes a special case to deal with
PEP 479 RuntimeErrors created when StopIteration is thrown into the context
manager body.

Previously this check was too permissive, and undid one level of chaining on all
RuntimeError instances, not just those that wrapped a StopIteration instance.
(cherry picked from commit 00c75e9)

…ntimeError (pythonGH-949)

contextlib._GeneratorContextManager.__exit__ includes a special case to deal with
PEP 479 RuntimeErrors created when `StopIteration` is thrown into the context
manager body.

Previously this check was too permissive, and undid one level of chaining on *all*
RuntimeError instances, not just those that wrapped a StopIteration instance.
(cherry picked from commit 00c75e9)
@Mariatta Mariatta merged commit 4d015a4 into python:3.5 Apr 13, 2017
@Mariatta Mariatta deleted the backport-00c75e9-3.5 branch April 13, 2017 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants