File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ __all__ = [
2020]
2121if sys .version_info >= (3 , 12 ):
2222 __all__ += ["islink" ]
23+ if sys .version_info >= (3 , 13 ):
24+ __all__ += ["isjunction" , "isdevdrive" , "lexists" ]
2325
2426# All overloads can return empty string. Ideally, Literal[""] would be a valid
2527# Iterable[T], so that list[T] | Literal[""] could be used as a return
@@ -50,3 +52,8 @@ def getctime(filename: FileDescriptorOrPath) -> float: ...
5052def samefile (f1 : FileDescriptorOrPath , f2 : FileDescriptorOrPath ) -> bool : ...
5153def sameopenfile (fp1 : int , fp2 : int ) -> bool : ...
5254def samestat (s1 : os .stat_result , s2 : os .stat_result ) -> bool : ...
55+
56+ if sys .version_info >= (3 , 13 ):
57+ def isjunction (path : StrOrBytesPath ) -> bool : ...
58+ def isdevdrive (path : StrOrBytesPath ) -> bool : ...
59+ def lexists (path : StrOrBytesPath ) -> bool : ...
Original file line number Diff line number Diff line change 11import sys
2- from _typeshed import BytesPath , StrPath
2+ from _typeshed import BytesPath , StrOrBytesPath , StrPath
33from genericpath import (
44 commonprefix as commonprefix ,
55 exists as exists ,
@@ -47,6 +47,8 @@ from typing_extensions import LiteralString
4747
4848if sys .version_info >= (3 , 12 ):
4949 from posixpath import isjunction as isjunction , splitroot as splitroot
50+ if sys .version_info >= (3 , 13 ):
51+ from genericpath import isdevdrive as isdevdrive
5052
5153__all__ = [
5254 "normcase" ,
@@ -90,6 +92,8 @@ __all__ = [
9092]
9193if sys .version_info >= (3 , 12 ):
9294 __all__ += ["isjunction" , "splitroot" ]
95+ if sys .version_info >= (3 , 13 ):
96+ __all__ += ["isdevdrive" , "isreserved" ]
9397
9498altsep : LiteralString
9599
@@ -117,3 +121,6 @@ if sys.platform == "win32":
117121
118122else :
119123 realpath = abspath
124+
125+ if sys .version_info >= (3 , 13 ):
126+ def isreserved (path : StrOrBytesPath ) -> bool : ...
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ from genericpath import (
1414 sameopenfile as sameopenfile ,
1515 samestat as samestat ,
1616)
17+
18+ if sys .version_info >= (3 , 13 ):
19+ from genericpath import isdevdrive as isdevdrive
1720from os import PathLike
1821from typing import AnyStr , overload
1922from typing_extensions import LiteralString
@@ -60,6 +63,8 @@ __all__ = [
6063]
6164if sys .version_info >= (3 , 12 ):
6265 __all__ += ["isjunction" , "splitroot" ]
66+ if sys .version_info >= (3 , 13 ):
67+ __all__ += ["isdevdrive" ]
6368
6469supports_unicode_filenames : bool
6570# aliases (also in os)
You can’t perform that action at this time.
0 commit comments