diff --git a/stdlib/pathlib/__init__.pyi b/stdlib/pathlib/__init__.pyi index fa5143f20292..65e29dbcb85c 100644 --- a/stdlib/pathlib/__init__.pyi +++ b/stdlib/pathlib/__init__.pyi @@ -90,6 +90,7 @@ class PurePath(PathLike[str]): def __rtruediv__(self, key: StrPath) -> Self: ... def __bytes__(self) -> bytes: ... def as_posix(self) -> str: ... + @deprecated("PurePath.as_uri() is deprecated. Use Path.as_uri() instead.") def as_uri(self) -> str: ... def is_absolute(self) -> bool: ... if sys.version_info >= (3, 13): @@ -345,6 +346,8 @@ class Path(PurePath): self, top_down: bool = True, on_error: Callable[[OSError], object] | None = None, follow_symlinks: bool = False ) -> Iterator[tuple[Self, list[str], list[str]]]: ... + def as_uri(self) -> str: ... + class PosixPath(Path, PurePosixPath): __slots__ = ()