Drop support for Python 3.5 (#4675)

Python 3.5 EOL was on 2020-09-30.
This commit is contained in:
Sebastian Rittau
2020-11-02 16:18:20 +01:00
committed by GitHub
parent 57b86e0e71
commit d2a7889fe0
64 changed files with 546 additions and 1174 deletions

View File

@@ -2,11 +2,6 @@ import sys
from _typeshed import AnyPath
from typing import Any, Optional, Pattern
if sys.version_info < (3, 6):
_SuccessType = bool
else:
_SuccessType = int
if sys.version_info >= (3, 7):
from py_compile import PycInvalidationMode
@@ -27,7 +22,7 @@ if sys.version_info >= (3, 9):
prependdir: Optional[AnyPath] = ...,
limit_sl_dest: Optional[AnyPath] = ...,
hardlink_dupes: bool = ...,
) -> _SuccessType: ...
) -> int: ...
def compile_file(
fullname: AnyPath,
ddir: Optional[AnyPath] = ...,
@@ -42,7 +37,7 @@ if sys.version_info >= (3, 9):
prependdir: Optional[AnyPath] = ...,
limit_sl_dest: Optional[AnyPath] = ...,
hardlink_dupes: bool = ...,
) -> _SuccessType: ...
) -> int: ...
elif sys.version_info >= (3, 7):
def compile_dir(
@@ -56,7 +51,7 @@ elif sys.version_info >= (3, 7):
optimize: int = ...,
workers: int = ...,
invalidation_mode: Optional[PycInvalidationMode] = ...,
) -> _SuccessType: ...
) -> int: ...
def compile_file(
fullname: AnyPath,
ddir: Optional[AnyPath] = ...,
@@ -66,7 +61,7 @@ elif sys.version_info >= (3, 7):
legacy: bool = ...,
optimize: int = ...,
invalidation_mode: Optional[PycInvalidationMode] = ...,
) -> _SuccessType: ...
) -> int: ...
else:
# rx can be any object with a 'search' method; once we have Protocols we can change the type
@@ -80,7 +75,7 @@ else:
legacy: bool = ...,
optimize: int = ...,
workers: int = ...,
) -> _SuccessType: ...
) -> int: ...
def compile_file(
fullname: AnyPath,
ddir: Optional[AnyPath] = ...,
@@ -89,7 +84,7 @@ else:
quiet: int = ...,
legacy: bool = ...,
optimize: int = ...,
) -> _SuccessType: ...
) -> int: ...
if sys.version_info >= (3, 7):
def compile_path(
@@ -100,7 +95,7 @@ if sys.version_info >= (3, 7):
legacy: bool = ...,
optimize: int = ...,
invalidation_mode: Optional[PycInvalidationMode] = ...,
) -> _SuccessType: ...
) -> int: ...
else:
def compile_path(
@@ -110,4 +105,4 @@ else:
quiet: int = ...,
legacy: bool = ...,
optimize: int = ...,
) -> _SuccessType: ...
) -> int: ...