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

@@ -1,5 +1,4 @@
import os
import sys
import types
from _typeshed import StrPath
from typing import IO, Any, List, Optional, Protocol, Tuple, TypeVar, Union
@@ -57,14 +56,9 @@ def load_package(name: str, path: StrPath) -> types.ModuleType: ...
def load_module(name: str, file: Optional[_FileLike], filename: str, details: Tuple[str, str, int]) -> types.ModuleType: ...
# IO[Any] is a TextIOWrapper if name is a .py file, and a FileIO otherwise.
if sys.version_info >= (3, 6):
def find_module(
name: str, path: Union[None, List[str], List[os.PathLike[str]], List[StrPath]] = ...
) -> Tuple[IO[Any], str, Tuple[str, str, int]]: ...
else:
def find_module(name: str, path: Optional[List[str]] = ...) -> Tuple[IO[Any], str, Tuple[str, str, int]]: ...
def find_module(
name: str, path: Union[None, List[str], List[os.PathLike[str]], List[StrPath]] = ...
) -> Tuple[IO[Any], str, Tuple[str, str, int]]: ...
def reload(module: types.ModuleType) -> types.ModuleType: ...
def init_builtin(name: str) -> Optional[types.ModuleType]: ...
def load_dynamic(name: str, path: str, file: Any = ...) -> types.ModuleType: ... # file argument is ignored