pathlib: update for py39 (#4134)

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2020-05-28 13:41:53 -07:00
committed by GitHub
parent feb43f7237
commit da2aa297a2
2 changed files with 12 additions and 0 deletions

View File

@@ -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: ...