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,3 +1,4 @@
import enum
import sys
from typing import Any, AnyStr, Callable, Iterator, List, Optional, Tuple, Union, overload
@@ -7,45 +8,7 @@ if sys.version_info >= (3, 7):
else:
from typing import Match, Pattern
if sys.version_info >= (3, 6):
import enum
class RegexFlag(enum.IntFlag):
A: int
ASCII: int
DEBUG: int
I: int
IGNORECASE: int
L: int
LOCALE: int
M: int
MULTILINE: int
S: int
DOTALL: int
X: int
VERBOSE: int
U: int
UNICODE: int
T: int
TEMPLATE: int
A = RegexFlag.A
ASCII = RegexFlag.ASCII
DEBUG = RegexFlag.DEBUG
I = RegexFlag.I
IGNORECASE = RegexFlag.IGNORECASE
L = RegexFlag.L
LOCALE = RegexFlag.LOCALE
M = RegexFlag.M
MULTILINE = RegexFlag.MULTILINE
S = RegexFlag.S
DOTALL = RegexFlag.DOTALL
X = RegexFlag.X
VERBOSE = RegexFlag.VERBOSE
U = RegexFlag.U
UNICODE = RegexFlag.UNICODE
T = RegexFlag.T
TEMPLATE = RegexFlag.TEMPLATE
_FlagsType = Union[int, RegexFlag]
else:
class RegexFlag(enum.IntFlag):
A: int
ASCII: int
DEBUG: int
@@ -63,7 +26,25 @@ else:
UNICODE: int
T: int
TEMPLATE: int
_FlagsType = int
A = RegexFlag.A
ASCII = RegexFlag.ASCII
DEBUG = RegexFlag.DEBUG
I = RegexFlag.I
IGNORECASE = RegexFlag.IGNORECASE
L = RegexFlag.L
LOCALE = RegexFlag.LOCALE
M = RegexFlag.M
MULTILINE = RegexFlag.MULTILINE
S = RegexFlag.S
DOTALL = RegexFlag.DOTALL
X = RegexFlag.X
VERBOSE = RegexFlag.VERBOSE
U = RegexFlag.U
UNICODE = RegexFlag.UNICODE
T = RegexFlag.T
TEMPLATE = RegexFlag.TEMPLATE
_FlagsType = Union[int, RegexFlag]
if sys.version_info < (3, 7):
# undocumented