Skip to content

Commit 122b3e8

Browse files
authored
1 parent 174ce8f commit 122b3e8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

stdlib/pathlib/__init__.pyi

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,14 @@ class PurePath(PathLike[str]):
6767
def as_posix(self) -> str: ...
6868
def as_uri(self) -> str: ...
6969
def is_absolute(self) -> bool: ...
70-
def is_reserved(self) -> bool: ...
70+
if sys.version_info >= (3, 13):
71+
@deprecated(
72+
"Deprecated since Python 3.13; will be removed in Python 3.15. "
73+
"Use `os.path.isreserved()` to detect reserved paths on Windows."
74+
)
75+
def is_reserved(self) -> bool: ...
76+
else:
77+
def is_reserved(self) -> bool: ...
7178
if sys.version_info >= (3, 14):
7279
def is_relative_to(self, other: StrPath) -> bool: ...
7380
elif sys.version_info >= (3, 12):
@@ -163,7 +170,6 @@ class Path(PurePath):
163170
def mkdir(self, mode: int = 0o777, parents: bool = False, exist_ok: bool = False) -> None: ...
164171

165172
if sys.version_info >= (3, 14):
166-
167173
@property
168174
def info(self) -> PathInfo: ...
169175
@overload

0 commit comments

Comments
 (0)