Skip to content

Commit cb50e63

Browse files
authored
Remove some 3.6 legacy (#13349)
1 parent 6db26db commit cb50e63

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

mypy/typeops.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"""
77

88
import itertools
9-
import sys
109
from typing import (
1110
Any,
1211
Dict,
@@ -857,14 +856,6 @@ class Status(Enum):
857856
if name in ENUM_REMOVED_PROPS:
858857
continue
859858
new_items.append(LiteralType(name, typ))
860-
# SymbolTables are really just dicts, and dicts are guaranteed to preserve
861-
# insertion order only starting with Python 3.7. So, we sort these for older
862-
# versions of Python to help make tests deterministic.
863-
#
864-
# We could probably skip the sort for Python 3.6 since people probably run mypy
865-
# only using CPython, but we might as well for the sake of full correctness.
866-
if sys.version_info < (3, 7):
867-
new_items.sort(key=lambda lit: lit.value)
868859
return make_simplified_union(new_items, contract_literals=False)
869860
elif typ.type.fullname == "builtins.bool":
870861
return make_simplified_union(

mypy/util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,10 @@ def get_unique_redefinition_name(name: str, existing: Container[str]) -> str:
426426
def check_python_version(program: str) -> None:
427427
"""Report issues with the Python used to run mypy, dmypy, or stubgen"""
428428
# Check for known bad Python versions.
429-
if sys.version_info[:2] < (3, 6):
429+
if sys.version_info[:2] < (3, 7):
430430
sys.exit(
431-
"Running {name} with Python 3.5 or lower is not supported; "
432-
"please upgrade to 3.6 or newer".format(name=program)
431+
"Running {name} with Python 3.6 or lower is not supported; "
432+
"please upgrade to 3.7 or newer".format(name=program)
433433
)
434434

435435

0 commit comments

Comments
 (0)