Skip to content

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

Merged
gvanrossum merged 1 commit into
python:masterfrom
carljm:check-for-py2-typing
Oct 4, 2017
Merged

gvanrossum merged 1 commit into
python:masterfrom
carljm:check-for-py2-typing

Conversation

@carljm

@carljm carljm commented Oct 1, 2017 •

Copy link
Copy Markdown
Member

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

carljm commented Oct 2, 2017

Copy link
Copy Markdown
Member Author

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

carljm commented Oct 3, 2017

Copy link
Copy Markdown
Member Author

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

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

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.

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

Copy link
Copy Markdown
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

carljm commented Oct 3, 2017

Copy link
Copy Markdown
Member Author

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