Revert "Update stub for builtin open function due to PEP-519."

This reverts commit 48b271c862.

See https://github.com/python/typeshed/pull/991#issuecomment-288160993
for details; basically this disturbed mypy's bootstrap import cycle.
This commit is contained in:
Guido van Rossum
2017-03-21 10:45:06 -07:00
parent 34575af8e4
commit baa61a151b

View File

@@ -799,8 +799,8 @@ def next(i: Iterator[_T], default: _VT) -> Union[_T, _VT]: ...
def oct(i: int) -> str: ... # TODO __index__
if sys.version_info >= (3, 6):
from os import PathLike
def open(file: Union[str, bytes, int, PathLike], mode: str = 'r', buffering: int = -1, encoding: str = None,
from pathlib import Path
def open(file: Union[str, bytes, int, Path], mode: str = 'r', buffering: int = -1, encoding: str = None,
errors: str = None, newline: str = None, closefd: bool = ...) -> IO[Any]: ...
else:
def open(file: Union[str, bytes, int], mode: str = 'r', buffering: int = -1, encoding: str = None,