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

Refuse to run under 3.5.0 or anything before 3.4 #4721

Merged
merged 2 commits into from Mar 13, 2018

Conversation

Projects
None yet
2 participants
@gvanrossum
Member

gvanrossum commented Mar 12, 2018

Fixes #4714

@ethanhs

Looks good! Just a couple of nits.

if vi[:2] < (3, 4):
sys.exit("Running mypy with Python 3.3 or lower is not supported; please upgrade")
if vi[:3] == (3, 5, 0):
sys.exit("Running mypy with Python 3.5.0 is not supported; please upgrade")

This comment has been minimized.

@ethanhs

ethanhs Mar 12, 2018

Collaborator

I think it is worth it to specify that upgrading to a later version of 3.5 is possible. It isn't hard for me to imagine someone seeing this and thinking that they must use 3.6.x or newer to use mypy, which is not the impression we want. Perhaps ... please upgrade to Python 3.5.1 or newer?

@@ -51,6 +51,13 @@ def main(script_path: Optional[str], args: Optional[List[str]] = None) -> None:
args: Custom command-line arguments. If not given, sys.argv[1:] will
be used.
"""
# Check for known bad Python versions.
vi = tuple(sys.version_info)

This comment has been minimized.

@ethanhs

ethanhs Mar 12, 2018

Collaborator

sys.version_info is already a tuple, so I think the tuple call is unnecessary.

@gvanrossum

This comment has been minimized.

Member

gvanrossum commented Mar 12, 2018

@ethanhs

Great!

@gvanrossum gvanrossum merged commit 6f6297d into python:master Mar 13, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gvanrossum gvanrossum deleted the gvanrossum:stop-bad-versions branch Mar 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment