Skip to content

Commit 6f6297d

Browse files
authored
Refuse to run under 3.5.0 or anything before 3.4 (#4721)
Fixes #4714
1 parent 3abc721 commit 6f6297d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mypy/main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ def main(script_path: Optional[str], args: Optional[List[str]] = None) -> None:
5151
args: Custom command-line arguments. If not given, sys.argv[1:] will
5252
be used.
5353
"""
54+
# Check for known bad Python versions.
55+
if sys.version_info[:2] < (3, 4):
56+
sys.exit("Running mypy with Python 3.3 or lower is not supported; "
57+
"please upgrade to 3.4 or newer")
58+
if sys.version_info[:3] == (3, 5, 0):
59+
sys.exit("Running mypy with Python 3.5.0 is not supported; "
60+
"please upgrade to 3.5.1 or newer")
61+
5462
t0 = time.time()
5563
# To log stat() calls: os.stat = stat_proxy
5664
if script_path:

0 commit comments

Comments
 (0)