diff --git a/mypy/build.py b/mypy/build.py index 9479351daac3..c6c44fd6ead8 100644 --- a/mypy/build.py +++ b/mypy/build.py @@ -2961,9 +2961,7 @@ def dfs(v: str) -> Iterator[Set[str]]: for w in edges[v]: if w not in index: - # For Python >= 3.3, replace with "yield from dfs(w)" - for scc in dfs(w): - yield scc + yield from dfs(w) elif w not in identified: while index[w] < boundaries[-1]: boundaries.pop() @@ -2977,9 +2975,7 @@ def dfs(v: str) -> Iterator[Set[str]]: for v in vertices: if v not in index: - # For Python >= 3.3, replace with "yield from dfs(v)" - for scc in dfs(v): - yield scc + yield from dfs(v) def topsort(data: Dict[AbstractSet[str], diff --git a/mypy/fastparse.py b/mypy/fastparse.py index 7d890570519b..577da287e421 100644 --- a/mypy/fastparse.py +++ b/mypy/fastparse.py @@ -98,7 +98,7 @@ def ast3_parse(source: Union[str, bytes], filename: str, mode: str, NamedExpr = Any Constant = Any except ImportError: - if sys.version_info.minor > 2: + if sys.version_info.minor > 4: try: from typed_ast import ast35 # type: ignore except ImportError: @@ -112,7 +112,7 @@ def ast3_parse(source: Union[str, bytes], filename: str, mode: str, file=sys.stderr) else: print('Mypy requires the typed_ast package, which is only compatible with\n' - 'Python 3.3 and greater.', file=sys.stderr) + 'Python 3.5 and greater.', file=sys.stderr) sys.exit(1) N = TypeVar('N', bound=Node) diff --git a/mypy/fastparse2.py b/mypy/fastparse2.py index 016a137c50a3..40b7e6821994 100644 --- a/mypy/fastparse2.py +++ b/mypy/fastparse2.py @@ -60,7 +60,7 @@ # Import ast3 from fastparse, which has special case for Python 3.8 from mypy.fastparse import ast3, ast3_parse except ImportError: - if sys.version_info.minor > 2: + if sys.version_info.minor > 4: try: from typed_ast import ast35 # type: ignore except ImportError: @@ -74,7 +74,7 @@ file=sys.stderr) else: print('Mypy requires the typed_ast package, which is only compatible with\n' - 'Python 3.3 and greater.', file=sys.stderr) + 'Python 3.5 and greater.', file=sys.stderr) sys.exit(1) N = TypeVar('N', bound=Node) diff --git a/tox.ini b/tox.ini index fc2604cc7f77..3c5c18262b44 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -minversion = 3.4.0 +minversion = 3.5.1 skip_missing_interpreters = true envlist = py34, py35,