@@ -55,7 +55,11 @@ class PurePath(PathLike[str]):
55
55
if sys .version_info >= (3 , 9 ):
56
56
def is_relative_to (self , * other : StrPath ) -> bool : ...
57
57
58
- def match (self , path_pattern : str ) -> bool : ...
58
+ if sys .version_info >= (3 , 12 ):
59
+ def match (self , path_pattern : str , * , case_sensitive : bool | None = None ) -> bool : ...
60
+ else :
61
+ def match (self , path_pattern : str ) -> bool : ...
62
+
59
63
def relative_to (self , * other : StrPath ) -> Self : ...
60
64
def with_name (self , name : str ) -> Self : ...
61
65
if sys .version_info >= (3 , 9 ):
@@ -70,6 +74,9 @@ class PurePath(PathLike[str]):
70
74
if sys .version_info >= (3 , 9 ) and sys .version_info < (3 , 11 ):
71
75
def __class_getitem__ (cls , type : Any ) -> GenericAlias : ...
72
76
77
+ if sys .version_info >= (3 , 12 ):
78
+ def with_segments (self , * args : StrPath ) -> Self : ...
79
+
73
80
class PurePosixPath (PurePath ): ...
74
81
class PureWindowsPath (PurePath ): ...
75
82
@@ -86,15 +93,25 @@ class Path(PurePath):
86
93
def stat (self ) -> stat_result : ...
87
94
def chmod (self , mode : int ) -> None : ...
88
95
89
- def exists (self ) -> bool : ...
90
- def glob (self , pattern : str ) -> Generator [Self , None , None ]: ...
96
+ if sys .version_info >= (3 , 12 ):
97
+ def exists (self , * , follow_symlinks : bool = True ) -> bool : ...
98
+ def glob (self , pattern : str , * , case_sensitive : bool | None = None ) -> Generator [Self , None , None ]: ...
99
+ def rglob (self , pattern : str , * , case_sensitive : bool | None = None ) -> Generator [Self , None , None ]: ...
100
+ else :
101
+ def exists (self ) -> bool : ...
102
+ def glob (self , pattern : str ) -> Generator [Self , None , None ]: ...
103
+ def rglob (self , pattern : str ) -> Generator [Self , None , None ]: ...
104
+
91
105
def is_dir (self ) -> bool : ...
92
106
def is_file (self ) -> bool : ...
93
107
def is_symlink (self ) -> bool : ...
94
108
def is_socket (self ) -> bool : ...
95
109
def is_fifo (self ) -> bool : ...
96
110
def is_block_device (self ) -> bool : ...
97
111
def is_char_device (self ) -> bool : ...
112
+ if sys .version_info >= (3 , 12 ):
113
+ def is_junction (self ) -> bool : ...
114
+
98
115
def iterdir (self ) -> Generator [Self , None , None ]: ...
99
116
def lchmod (self , mode : int ) -> None : ...
100
117
def lstat (self ) -> stat_result : ...
@@ -175,7 +192,6 @@ class Path(PurePath):
175
192
def replace (self , target : str | PurePath ) -> None : ...
176
193
177
194
def resolve (self , strict : bool = False ) -> Self : ...
178
- def rglob (self , pattern : str ) -> Generator [Self , None , None ]: ...
179
195
def rmdir (self ) -> None : ...
180
196
def symlink_to (self , target : StrOrBytesPath , target_is_directory : bool = False ) -> None : ...
181
197
if sys .version_info >= (3 , 10 ):
0 commit comments