summaryrefslogtreecommitdiffstats
path: root/Doc/library/tarfile.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-07-21 09:34:30 (GMT)
committerGitHub <noreply@github.com>2023-07-21 09:34:30 (GMT)
commitd036db728ea3d54509cbad06df74e2d9a31fbec8 (patch)
treefd69c04729af3029a8ac11e8771d4d4893b4ffc1 /Doc/library/tarfile.rst
parent8d397ee8259fa0f81598a452438fc335267ca260 (diff)
downloadcpython-d036db728ea3d54509cbad06df74e2d9a31fbec8.zip
cpython-d036db728ea3d54509cbad06df74e2d9a31fbec8.tar.gz
cpython-d036db728ea3d54509cbad06df74e2d9a31fbec8.tar.bz2
gh-106892: Use roles :data: and :const: for referencing module variables (GH-106894)
Diffstat (limited to 'Doc/library/tarfile.rst')
-rw-r--r--Doc/library/tarfile.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst
index fd4820e..00f3070 100644
--- a/Doc/library/tarfile.rst
+++ b/Doc/library/tarfile.rst
@@ -938,7 +938,7 @@ reused in custom filters:
Implements the ``'tar'`` filter.
- - Strip leading slashes (``/`` and :attr:`os.sep`) from filenames.
+ - Strip leading slashes (``/`` and :data:`os.sep`) from filenames.
- :ref:`Refuse <tarfile-extraction-refuse>` to extract files with absolute
paths (in case the name is absolute
even after stripping slashes, e.g. ``C:/foo`` on Windows).
@@ -947,7 +947,7 @@ reused in custom filters:
path (after following symlinks) would end up outside the destination.
This raises :class:`~tarfile.OutsideDestinationError`.
- Clear high mode bits (setuid, setgid, sticky) and group/other write bits
- (:attr:`~stat.S_IWGRP`|:attr:`~stat.S_IWOTH`).
+ (:const:`~stat.S_IWGRP`|:const:`~stat.S_IWOTH`).
Return the modified ``TarInfo`` member.
@@ -972,10 +972,10 @@ reused in custom filters:
- For regular files, including hard links:
- Set the owner read and write permissions
- (:attr:`~stat.S_IRUSR`|:attr:`~stat.S_IWUSR`).
+ (:const:`~stat.S_IRUSR`|:const:`~stat.S_IWUSR`).
- Remove the group & other executable permission
- (:attr:`~stat.S_IXGRP`|:attr:`~stat.S_IXOTH`)
- if the owner doesn’t have it (:attr:`~stat.S_IXUSR`).
+ (:const:`~stat.S_IXGRP`|:const:`~stat.S_IXOTH`)
+ if the owner doesn’t have it (:const:`~stat.S_IXUSR`).
- For other files (directories), set ``mode`` to ``None``, so
that extraction methods skip applying permission bits.