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,4 +1,3 @@
import sys
from _typeshed import SupportsRead
from typing import IO, Any, Callable, Dict, List, Optional, Tuple, Type, Union
@@ -34,14 +33,8 @@ def dump(
sort_keys: bool = ...,
**kwds: Any,
) -> None: ...
if sys.version_info >= (3, 6):
_LoadsString = Union[str, bytes]
else:
_LoadsString = str
def loads(
s: _LoadsString,
s: Union[str, bytes],
*,
cls: Optional[Type[JSONDecoder]] = ...,
object_hook: Optional[Callable[[Dict[Any, Any]], Any]] = ...,
@@ -52,7 +45,7 @@ def loads(
**kwds: Any,
) -> Any: ...
def load(
fp: SupportsRead[_LoadsString],
fp: SupportsRead[Union[str, bytes]],
*,
cls: Optional[Type[JSONDecoder]] = ...,
object_hook: Optional[Callable[[Dict[Any, Any]], Any]] = ...,

View File

@@ -1,4 +1,3 @@
import sys
from typing import Any, Callable, Dict, List, Optional, Tuple
class JSONDecodeError(ValueError):
@@ -16,27 +15,15 @@ class JSONDecoder:
parse_constant: Callable[[str], Any] = ...
strict: bool
object_pairs_hook: Callable[[List[Tuple[str, Any]]], Any]
if sys.version_info >= (3, 6):
def __init__(
self,
*,
object_hook: Optional[Callable[[Dict[str, Any]], Any]] = ...,
parse_float: Optional[Callable[[str], Any]] = ...,
parse_int: Optional[Callable[[str], Any]] = ...,
parse_constant: Optional[Callable[[str], Any]] = ...,
strict: bool = ...,
object_pairs_hook: Optional[Callable[[List[Tuple[str, Any]]], Any]] = ...,
) -> None: ...
else:
def __init__(
self,
object_hook: Optional[Callable[[Dict[str, Any]], Any]] = ...,
parse_float: Optional[Callable[[str], Any]] = ...,
parse_int: Optional[Callable[[str], Any]] = ...,
parse_constant: Optional[Callable[[str], Any]] = ...,
strict: bool = ...,
object_pairs_hook: Optional[Callable[[List[Tuple[str, Any]]], Any]] = ...,
) -> None: ...
def __init__(
self,
*,
object_hook: Optional[Callable[[Dict[str, Any]], Any]] = ...,
parse_float: Optional[Callable[[str], Any]] = ...,
parse_int: Optional[Callable[[str], Any]] = ...,
parse_constant: Optional[Callable[[str], Any]] = ...,
strict: bool = ...,
object_pairs_hook: Optional[Callable[[List[Tuple[str, Any]]], Any]] = ...,
) -> None: ...
def decode(self, s: str, _w: Callable[..., Any] = ...) -> Any: ... # _w is undocumented
def raw_decode(self, s: str, idx: int = ...) -> Tuple[Any, int]: ...

View File

@@ -1,4 +1,3 @@
import sys
from typing import Any, Callable, Iterator, Optional, Tuple
class JSONEncoder:
@@ -11,32 +10,18 @@ class JSONEncoder:
allow_nan: bool
sort_keys: bool
indent: int
if sys.version_info >= (3, 6):
def __init__(
self,
*,
skipkeys: bool = ...,
ensure_ascii: bool = ...,
check_circular: bool = ...,
allow_nan: bool = ...,
sort_keys: bool = ...,
indent: Optional[int] = ...,
separators: Optional[Tuple[str, str]] = ...,
default: Optional[Callable[..., Any]] = ...,
) -> None: ...
else:
def __init__(
self,
skipkeys: bool = ...,
ensure_ascii: bool = ...,
check_circular: bool = ...,
allow_nan: bool = ...,
sort_keys: bool = ...,
indent: Optional[int] = ...,
separators: Optional[Tuple[str, str]] = ...,
default: Optional[Callable[..., Any]] = ...,
) -> None: ...
def __init__(
self,
*,
skipkeys: bool = ...,
ensure_ascii: bool = ...,
check_circular: bool = ...,
allow_nan: bool = ...,
sort_keys: bool = ...,
indent: Optional[int] = ...,
separators: Optional[Tuple[str, str]] = ...,
default: Optional[Callable[..., Any]] = ...,
) -> None: ...
def default(self, o: Any) -> Any: ...
def encode(self, o: Any) -> str: ...
def iterencode(self, o: Any, _one_shot: bool = ...) -> Iterator[str]: ...