diff --git a/stdlib/3/pathlib.pyi b/stdlib/3/pathlib.pyi index 259bafef7..b76f2ec5b 100644 --- a/stdlib/3/pathlib.pyi +++ b/stdlib/3/pathlib.pyi @@ -45,12 +45,16 @@ class PurePath(_PurePathBase): def as_uri(self) -> str: ... def is_absolute(self) -> bool: ... def is_reserved(self) -> bool: ... + if sys.version_info >= (3, 9): + def is_relative_to(self, *other: Union[str, os.PathLike[str]]) -> bool: ... def match(self, path_pattern: str) -> bool: ... if sys.version_info < (3, 6): def relative_to(self: _P, *other: Union[str, PurePath]) -> _P: ... else: def relative_to(self: _P, *other: Union[str, os.PathLike[str]]) -> _P: ... def with_name(self: _P, name: str) -> _P: ... + if sys.version_info >= (3, 9): + def with_stem(self: _P, stem: str) -> _P: ... def with_suffix(self: _P, suffix: str) -> _P: ... if sys.version_info < (3, 6): def joinpath(self: _P, *other: Union[str, PurePath]) -> _P: ... @@ -105,6 +109,8 @@ class Path(PurePath): def open(self, mode: str, buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ...) -> IO[Any]: ... def owner(self) -> str: ... + if sys.version_info >= (3, 9): + def readlink(self: _P) -> _P: ... if sys.version_info >= (3, 8): def rename(self: _P, target: Union[str, PurePath]) -> _P: ... def replace(self: _P, target: Union[str, PurePath]) -> _P: ... diff --git a/third_party/2/pathlib2.pyi b/third_party/2/pathlib2.pyi index 259bafef7..b76f2ec5b 100644 --- a/third_party/2/pathlib2.pyi +++ b/third_party/2/pathlib2.pyi @@ -45,12 +45,16 @@ class PurePath(_PurePathBase): def as_uri(self) -> str: ... def is_absolute(self) -> bool: ... def is_reserved(self) -> bool: ... + if sys.version_info >= (3, 9): + def is_relative_to(self, *other: Union[str, os.PathLike[str]]) -> bool: ... def match(self, path_pattern: str) -> bool: ... if sys.version_info < (3, 6): def relative_to(self: _P, *other: Union[str, PurePath]) -> _P: ... else: def relative_to(self: _P, *other: Union[str, os.PathLike[str]]) -> _P: ... def with_name(self: _P, name: str) -> _P: ... + if sys.version_info >= (3, 9): + def with_stem(self: _P, stem: str) -> _P: ... def with_suffix(self: _P, suffix: str) -> _P: ... if sys.version_info < (3, 6): def joinpath(self: _P, *other: Union[str, PurePath]) -> _P: ... @@ -105,6 +109,8 @@ class Path(PurePath): def open(self, mode: str, buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ...) -> IO[Any]: ... def owner(self) -> str: ... + if sys.version_info >= (3, 9): + def readlink(self: _P) -> _P: ... if sys.version_info >= (3, 8): def rename(self: _P, target: Union[str, PurePath]) -> _P: ... def replace(self: _P, target: Union[str, PurePath]) -> _P: ...