[Python-checkins] [3.11] GH-99818: improve the documentation for zipfile.Path and Traversable (GH-101589) (#102266)

FFY00 webhook-mailer at python.org
Sat Feb 25 18:42:37 EST 2023


https://github.com/python/cpython/commit/735ff5ae27fd417ef4dfdcbbbecb739ee4b73013
commit: 735ff5ae27fd417ef4dfdcbbbecb739ee4b73013
branch: 3.11
author: Shantanu <12621235+hauntsaninja at users.noreply.github.com>
committer: FFY00 <filipe.lains at gmail.com>
date: 2023-02-25T23:42:30Z
summary:

[3.11] GH-99818: improve the documentation for zipfile.Path and Traversable (GH-101589) (#102266)

Automerge-Triggered-By: GH:FFY00
(cherry picked from commit 84181c14040ed2befe7f1a55b4f560c80fa61154)

Co-authored-by: Filipe Laíns <lains at riseup.net>

files:
M Doc/library/importlib.resources.abc.rst
M Doc/library/zipfile.rst

diff --git a/Doc/library/importlib.resources.abc.rst b/Doc/library/importlib.resources.abc.rst
index a028537f3cb2..4a563c8a5390 100644
--- a/Doc/library/importlib.resources.abc.rst
+++ b/Doc/library/importlib.resources.abc.rst
@@ -86,9 +86,12 @@
 
 .. class:: Traversable
 
-    An object with a subset of pathlib.Path methods suitable for
+    An object with a subset of :class:`pathlib.Path` methods suitable for
     traversing directories and opening files.
 
+    For a representation of the object on the file-system, use
+    :meth:`importlib.resources.as_file`.
+
     .. versionadded:: 3.9
 
     .. attribute:: name
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
index af1f26385553..9ad0a979e498 100644
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -55,8 +55,9 @@ The module defines the following items:
 .. class:: Path
    :noindex:
 
-   A pathlib-compatible wrapper for zip files. See section
-   :ref:`path-objects` for details.
+   Class that implements a subset of the interface provided by
+   :class:`pathlib.Path`, including the full
+   :class:`importlib.resources.abc.Traversable` interface.
 
    .. versionadded:: 3.8
 



More information about the Python-checkins mailing list