[Python-checkins] [3.9] gh-96845: Fix docs around importlib.abc.Traversable (GH-97515) (GH-97761)

ambv webhook-mailer at python.org
Tue Oct 4 12:58:40 EDT 2022


https://github.com/python/cpython/commit/71edddea86c53a91a56ebebdb18e9d616f4675c2
commit: 71edddea86c53a91a56ebebdb18e9d616f4675c2
branch: 3.9
author: Jason R. Coombs <jaraco at jaraco.com>
committer: ambv <lukasz at langa.pl>
date: 2022-10-04T09:58:34-07:00
summary:

[3.9] gh-96845: Fix docs around importlib.abc.Traversable (GH-97515) (GH-97761)

Co-authored-by: Jason R. Coombs <jaraco at jaraco.com>

files:
M Doc/library/importlib.rst

diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index c7fbcb21274a..975648153101 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -845,6 +845,8 @@ ABC hierarchy::
 
        Read contents of self as text.
 
+    Note: In Python 3.11 and later, this class is found in ``importlib.resources.abc``.
+
 
 .. class:: TraversableResources
 
@@ -856,6 +858,8 @@ ABC hierarchy::
 
     .. versionadded:: 3.9
 
+    Note: In Python 3.11 and later, this class is found in ``importlib.resources.abc``.
+
 
 :mod:`importlib.resources` -- Resources
 ---------------------------------------
@@ -918,7 +922,7 @@ The following functions are available.
 
 .. function:: files(package)
 
-    Returns an :class:`importlib.resources.abc.Traversable` object
+    Returns an :class:`importlib.abc.Traversable` object
     representing the resource container for the package (think directory)
     and its resources (think files). A Traversable may contain other
     containers (think subdirectories).
@@ -930,7 +934,7 @@ The following functions are available.
 
 .. function:: as_file(traversable)
 
-    Given a :class:`importlib.resources.abc.Traversable` object representing
+    Given a :class:`importlib.abc.Traversable` object representing
     a file, typically from :func:`importlib.resources.files`, return
     a context manager for use in a :keyword:`with` statement.
     The context manager provides a :class:`pathlib.Path` object.



More information about the Python-checkins mailing list