Skip to content

Commit 6b91224

Browse files
authored
[3.10] Fix PurePath.relative_to links in the pathlib documentation (GH-93268) (GH-93590)
These are currently broken as they refer to :meth:`Path.relative_to` rather than :meth:`PurePath.relative_to`, and `relative_to` is a method on `PurePath`.. (cherry picked from commit 8ef7929) Co-authored-by: jacksonriley <52106215+jacksonriley@users.noreply.github.com> Backport of #93268
1 parent b4fdd8c commit 6b91224

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/pathlib.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,7 @@ Below is a table mapping various :mod:`os` functions to their corresponding
12651265
:func:`os.link` :meth:`Path.hardlink_to`
12661266
:func:`os.symlink` :meth:`Path.symlink_to`
12671267
:func:`os.readlink` :meth:`Path.readlink`
1268-
:func:`os.path.relpath` :meth:`Path.relative_to` [#]_
1268+
:func:`os.path.relpath` :meth:`PurePath.relative_to` [#]_
12691269
:func:`os.stat` :meth:`Path.stat`,
12701270
:meth:`Path.owner`,
12711271
:meth:`Path.group`
@@ -1280,4 +1280,4 @@ Below is a table mapping various :mod:`os` functions to their corresponding
12801280
.. rubric:: Footnotes
12811281

12821282
.. [#] :func:`os.path.abspath` does not resolve symbolic links while :meth:`Path.resolve` does.
1283-
.. [#] :meth:`Path.relative_to` requires ``self`` to be the subpath of the argument, but :func:`os.path.relpath` does not.
1283+
.. [#] :meth:`PurePath.relative_to` requires ``self`` to be the subpath of the argument, but :func:`os.path.relpath` does not.

0 commit comments

Comments
 (0)