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

@@ -29,13 +29,12 @@ class Enum(metaclass=EnumMeta):
_value2member_map_: Dict[int, Enum] # undocumented
if sys.version_info >= (3, 7):
_ignore_: Union[str, List[str]]
if sys.version_info >= (3, 6):
_order_: str
__order__: str
@classmethod
def _missing_(cls, value: object) -> Any: ...
@staticmethod
def _generate_next_value_(name: str, start: int, count: int, last_values: List[Any]) -> Any: ...
_order_: str
__order__: str
@classmethod
def _missing_(cls, value: object) -> Any: ...
@staticmethod
def _generate_next_value_(name: str, start: int, count: int, last_values: List[Any]) -> Any: ...
def __new__(cls: Type[_T], value: object) -> _T: ...
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
@@ -49,25 +48,26 @@ class IntEnum(int, Enum):
def unique(enumeration: _S) -> _S: ...
if sys.version_info >= (3, 6):
_auto_null: Any
_auto_null: Any
# subclassing IntFlag so it picks up all implemented base functions, best modeling behavior of enum.auto()
class auto(IntFlag):
value: Any
class Flag(Enum):
def __contains__(self: _T, other: _T) -> bool: ...
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
def __bool__(self) -> bool: ...
def __or__(self: _T, other: _T) -> _T: ...
def __and__(self: _T, other: _T) -> _T: ...
def __xor__(self: _T, other: _T) -> _T: ...
def __invert__(self: _T) -> _T: ...
class IntFlag(int, Flag):
def __or__(self: _T, other: Union[int, _T]) -> _T: ...
def __and__(self: _T, other: Union[int, _T]) -> _T: ...
def __xor__(self: _T, other: Union[int, _T]) -> _T: ...
__ror__ = __or__
__rand__ = __and__
__rxor__ = __xor__
# subclassing IntFlag so it picks up all implemented base functions, best modeling behavior of enum.auto()
class auto(IntFlag):
value: Any
class Flag(Enum):
def __contains__(self: _T, other: _T) -> bool: ...
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
def __bool__(self) -> bool: ...
def __or__(self: _T, other: _T) -> _T: ...
def __and__(self: _T, other: _T) -> _T: ...
def __xor__(self: _T, other: _T) -> _T: ...
def __invert__(self: _T) -> _T: ...
class IntFlag(int, Flag):
def __or__(self: _T, other: Union[int, _T]) -> _T: ...
def __and__(self: _T, other: Union[int, _T]) -> _T: ...
def __xor__(self: _T, other: Union[int, _T]) -> _T: ...
__ror__ = __or__
__rand__ = __and__
__rxor__ = __xor__

View File

@@ -8,7 +8,7 @@ MAX_SUPPORTED_SIGNED_VALUE_VERSION: Any
DEFAULT_SIGNED_VALUE_VERSION: Any
DEFAULT_SIGNED_VALUE_MIN_VERSION: Any
if sys.version_info[:2] >= (3, 5):
if sys.version_info >= (3, 5):
from typing import Awaitable
_MethodType = Callable[..., Optional[Awaitable[None]]]