fix contextlib GeneratorContextManager name for py>=3.2#3083
Merged
ilevkivskyi merged 1 commit intopython:masterfrom Jul 2, 2019
Merged
fix contextlib GeneratorContextManager name for py>=3.2#3083ilevkivskyi merged 1 commit intopython:masterfrom
ilevkivskyi merged 1 commit intopython:masterfrom
Conversation
ilevkivskyi
approved these changes
Jul 2, 2019
Member
ilevkivskyi
left a comment
There was a problem hiding this comment.
OK, I am going to merge this now and sync mypy.
ilevkivskyi
pushed a commit
to python/mypy
that referenced
this pull request
Jul 2, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The change to
contextlib.pyiis correct but breaking. Since py3.2 the contextlib member has been prefixed by the_(compare https://github.com/python/cpython/blob/ccc4ffe7a1e2ae151959446722bf1b58834f5e9f/Lib/contextlib.py#L9 to https://github.com/python/cpython/blob/076ca6c3c8df3030307e548d9be792ce3c1c6eea/Lib/contextlib.py#L33). An existing mypy test expects the broken behaviour: https://github.com/python/mypy/blob/2e098a2ee1fec57e46b21f49b673cdfe01f8dc21/test-data/unit/pythoneval.test#L1033This results in a local test failure when running mypy tests:
Fix for the mypy tests python/mypy#6958 -- I will need help from the core dev team to sync the changes.