os.path etc: update for py313 (#11965)

This commit is contained in:
Shantanu
2024-05-18 14:57:44 -07:00
committed by GitHub
parent 2756f16a11
commit 87edeb65d8
3 changed files with 20 additions and 1 deletions

View File

@@ -20,6 +20,8 @@ __all__ = [
]
if sys.version_info >= (3, 12):
__all__ += ["islink"]
if sys.version_info >= (3, 13):
__all__ += ["isjunction", "isdevdrive", "lexists"]
# All overloads can return empty string. Ideally, Literal[""] would be a valid
# Iterable[T], so that list[T] | Literal[""] could be used as a return
@@ -50,3 +52,8 @@ def getctime(filename: FileDescriptorOrPath) -> float: ...
def samefile(f1: FileDescriptorOrPath, f2: FileDescriptorOrPath) -> bool: ...
def sameopenfile(fp1: int, fp2: int) -> bool: ...
def samestat(s1: os.stat_result, s2: os.stat_result) -> bool: ...
if sys.version_info >= (3, 13):
def isjunction(path: StrOrBytesPath) -> bool: ...
def isdevdrive(path: StrOrBytesPath) -> bool: ...
def lexists(path: StrOrBytesPath) -> bool: ...