removals in Python 3.7 (#2018)

Last part of #1965.
This commit is contained in:
Jelle Zijlstra
2018-04-06 11:11:29 -07:00
committed by Guido van Rossum
parent 0acdfd1548
commit 54ecefef04
5 changed files with 18 additions and 9 deletions

View File

@@ -52,7 +52,10 @@ _VT = TypeVar('_VT')
# namedtuple is special-cased in the type checker; the initializer is ignored.
if sys.version_info >= (3, 6):
if sys.version_info >= (3, 7):
def namedtuple(typename: str, field_names: Union[str, Iterable[str]], *,
rename: bool = ..., module: Optional[str] = ...) -> Type[tuple]: ...
elif sys.version_info >= (3, 6):
def namedtuple(typename: str, field_names: Union[str, Iterable[str]], *,
verbose: bool = ..., rename: bool = ..., module: Optional[str] = ...) -> Type[tuple]: ...
else: