Remove Python 3.4 support (#3147)

Closes #3123
This commit is contained in:
Sebastian Rittau
2019-07-27 10:58:21 +02:00
committed by GitHub
parent 4697adcb1a
commit 9ccf9356bf
55 changed files with 988 additions and 1266 deletions

View File

@@ -25,7 +25,7 @@ from typing import (
_KT = TypeVar('_KT')
_VT = TypeVar('_VT')
if sys.version_info[0] >= 3:
if sys.version_info >= (3,):
# TODO move _StringIO definition into boto.compat once stubs exist and rename to StringIO
import io
_StringIO = io.StringIO

View File

@@ -49,5 +49,5 @@ class EscapeFormatter(string.Formatter):
def __init__(self, escape: Callable[[text_type], Markup]) -> None: ...
def format_field(self, value: text_type, format_spec: text_type) -> Markup: ...
if sys.version_info[0] >= 3:
if sys.version_info >= (3,):
soft_str = soft_unicode

View File

@@ -7,7 +7,7 @@ _V = TypeVar('_V')
PY2: bool
def iteritems(d: Mapping[_K, _V]) -> Iterator[Tuple[_K, _V]]: ...
if sys.version_info[0] >= 3:
if sys.version_info >= (3,):
text_type = str
string_types = str,
unichr = chr

View File

@@ -4,11 +4,4 @@ import sys
needs_makedirs: bool
def _makedirs_31(path: Text, exist_ok: bool = ...) -> None: ...
# _makedirs_31 has special behavior to handle an edge case that was removed in
# 3.4.1. No one should be using 3.4 instead of 3.4.1, so this should be fine.
if sys.version_info >= (3,):
makedirs = os.makedirs
else:
makedirs = _makedirs_31
makedirs = os.makedirs