Skip to content

Commit 11e703e

Browse files
authored
[pathlib] Deprecate PurePath.as_uri (#15178)
1 parent 0338df4 commit 11e703e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stdlib/pathlib/__init__.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ class PurePath(PathLike[str]):
9090
def __rtruediv__(self, key: StrPath) -> Self: ...
9191
def __bytes__(self) -> bytes: ...
9292
def as_posix(self) -> str: ...
93+
@deprecated("Deprecated since Python 3.14; will be removed in Python 3.19. Use `Path.as_uri()` instead.")
9394
def as_uri(self) -> str: ...
9495
def is_absolute(self) -> bool: ...
9596
if sys.version_info >= (3, 13):
@@ -345,6 +346,8 @@ class Path(PurePath):
345346
self, top_down: bool = True, on_error: Callable[[OSError], object] | None = None, follow_symlinks: bool = False
346347
) -> Iterator[tuple[Self, list[str], list[str]]]: ...
347348

349+
def as_uri(self) -> str: ...
350+
348351
class PosixPath(Path, PurePosixPath):
349352
__slots__ = ()
350353

0 commit comments

Comments
 (0)