From 48b271c862283273c4047ff8776c56ffa5646160 Mon Sep 17 00:00:00 2001 From: Semyon Proshev Date: Mon, 13 Mar 2017 18:33:02 +0300 Subject: [PATCH] Update stub for builtin `open` function due to PEP-519. --- stdlib/3/builtins.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index b0669b118..93df5edef 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -795,8 +795,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 pathlib import Path - def open(file: Union[str, bytes, int, Path], mode: str = 'r', buffering: int = -1, encoding: str = None, + from os import PathLike + def open(file: Union[str, bytes, int, PathLike], 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,