Skip to content

Require typing module before using a Py2 interpreter for tests. #4041

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
Oct 4, 2017

Conversation

carljm
Copy link
Member

@carljm carljm commented Oct 1, 2017

Fixes #4039.

Tested with:

a) Python 2.7 interpreter on PATH without typing installed: Py2 subprocess
tests skipped.

b) Python 2.7 interpreter on PATH with typing installed: Py2 subprocess tests
pass.

c) Temporarily change assertion to require (2, 6) instead of (2, 7), with
no Python2.6 interpreter available, and typing installed in Python2.7 interpreter
on PATH (to verify that version assert works correctly): Py2 subprocess tests skipped.

@carljm
Copy link
Member Author

carljm commented Oct 2, 2017

I think the Travis failure here is some kind of flaky unrelated failure, but I'm not 100% sure. Can someone with the necessary access trigger a re-run?

@carljm
Copy link
Member Author

carljm commented Oct 3, 2017

Any concerns about merging this that I can do some further testing to assuage?

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the formatting I think it's fine.

mypy/util.py Outdated
'-c',
'import sys, typing; assert sys.version_info[:2] == (2, 7)'
],
).wait()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use this incredibly stretched vertical layout; it hurts my eyes and does not help me understand the code.

Tested with:

a) Python 2.7 interpreter on PATH without typing installed: Py2 subprocess
tests skipped.

b) Python 2.7 interpreter on PATH with typing installed: Py2 subprocess tests
pass.

c) Temporarily change assertion to require `(2, 6)` instead of `(2, 7)`, with
no Python2.6 interpreter available (to verify that version assert works
correctly): Py2 subprocess tests skipped.
@carljm carljm force-pushed the check-for-py2-typing branch from 9c8724a to 5c5b184 Compare October 3, 2017 22:55
@carljm
Copy link
Member Author

carljm commented Oct 3, 2017

Adjusted the formatting to be more vertically compact.

@gvanrossum gvanrossum merged commit b3b992f into python:master Oct 4, 2017
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.

2 participants