Skip to content

Commit

Permalink
Add some more changes for no longer supporting 3.3/3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanhs committed Mar 26, 2019
1 parent 29fdba3 commit d40728a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
8 changes: 2 additions & 6 deletions mypy/build.py
Expand Up @@ -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()
Expand All @@ -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],
Expand Down
4 changes: 2 additions & 2 deletions mypy/fastparse.py
Expand Up @@ -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:
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions mypy/fastparse2.py
Expand Up @@ -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:
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,5 +1,5 @@
[tox]
minversion = 3.4.0
minversion = 3.5.1
skip_missing_interpreters = true
envlist = py34,

This comment has been minimized.

Copy link
@gvanrossum

gvanrossum Mar 26, 2019

Member

What about this line?

This comment has been minimized.

Copy link
@ethanhs

ethanhs Mar 26, 2019

Author Collaborator

Thanks, fixed in my next commit.

py35,
Expand Down

0 comments on commit d40728a

Please sign in to comment.