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

@@ -252,32 +252,31 @@ class AsyncIterator(AsyncIterable[_T_co], Protocol[_T_co]):
def __anext__(self) -> Awaitable[_T_co]: ...
def __aiter__(self) -> AsyncIterator[_T_co]: ...
if sys.version_info >= (3, 6):
class AsyncGenerator(AsyncIterator[_T_co], Generic[_T_co, _T_contra]):
@abstractmethod
def __anext__(self) -> Awaitable[_T_co]: ...
@abstractmethod
def asend(self, __value: _T_contra) -> Awaitable[_T_co]: ...
@overload
@abstractmethod
def athrow(
self, __typ: Type[BaseException], __val: Union[BaseException, object] = ..., __tb: Optional[TracebackType] = ...
) -> Awaitable[_T_co]: ...
@overload
@abstractmethod
def athrow(self, __typ: BaseException, __val: None = ..., __tb: Optional[TracebackType] = ...) -> Awaitable[_T_co]: ...
@abstractmethod
def aclose(self) -> Awaitable[None]: ...
@abstractmethod
def __aiter__(self) -> AsyncGenerator[_T_co, _T_contra]: ...
@property
def ag_await(self) -> Any: ...
@property
def ag_code(self) -> CodeType: ...
@property
def ag_frame(self) -> FrameType: ...
@property
def ag_running(self) -> bool: ...
class AsyncGenerator(AsyncIterator[_T_co], Generic[_T_co, _T_contra]):
@abstractmethod
def __anext__(self) -> Awaitable[_T_co]: ...
@abstractmethod
def asend(self, __value: _T_contra) -> Awaitable[_T_co]: ...
@overload
@abstractmethod
def athrow(
self, __typ: Type[BaseException], __val: Union[BaseException, object] = ..., __tb: Optional[TracebackType] = ...
) -> Awaitable[_T_co]: ...
@overload
@abstractmethod
def athrow(self, __typ: BaseException, __val: None = ..., __tb: Optional[TracebackType] = ...) -> Awaitable[_T_co]: ...
@abstractmethod
def aclose(self) -> Awaitable[None]: ...
@abstractmethod
def __aiter__(self) -> AsyncGenerator[_T_co, _T_contra]: ...
@property
def ag_await(self) -> Any: ...
@property
def ag_code(self) -> CodeType: ...
@property
def ag_frame(self) -> FrameType: ...
@property
def ag_running(self) -> bool: ...
@runtime_checkable
class Container(Protocol[_T_co]):
@@ -286,19 +285,13 @@ class Container(Protocol[_T_co]):
if sys.version_info >= (3, 9):
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
if sys.version_info >= (3, 6):
@runtime_checkable
class Collection(Iterable[_T_co], Container[_T_co], Protocol[_T_co]):
# Implement Sized (but don't have it as a base class).
@abstractmethod
def __len__(self) -> int: ...
_Collection = Collection[_T_co]
else:
@runtime_checkable
class _Collection(Iterable[_T_co], Container[_T_co], Protocol[_T_co]):
# Implement Sized (but don't have it as a base class).
@abstractmethod
def __len__(self) -> int: ...
@runtime_checkable
class Collection(Iterable[_T_co], Container[_T_co], Protocol[_T_co]):
# Implement Sized (but don't have it as a base class).
@abstractmethod
def __len__(self) -> int: ...
_Collection = Collection[_T_co]
class Sequence(_Collection[_T_co], Reversible[_T_co], Generic[_T_co]):
@overload
@@ -573,8 +566,7 @@ class Match(Generic[AnyStr]):
def span(self, __group: Union[int, str] = ...) -> Tuple[int, int]: ...
@property
def regs(self) -> Tuple[Tuple[int, int], ...]: ... # undocumented
if sys.version_info >= (3, 6):
def __getitem__(self, g: Union[int, str]) -> AnyStr: ...
def __getitem__(self, g: Union[int, str]) -> AnyStr: ...
if sys.version_info >= (3, 9):
def __class_getitem__(cls, item: Any) -> GenericAlias: ...