Issue #15343: Handle importlib.machinery.FileFinder instances in pkgutil.walk_packages (et al)
diff --git a/Doc/library/pkgutil.rst b/Doc/library/pkgutil.rst
index bcd5d91..22d44eb 100644
--- a/Doc/library/pkgutil.rst
+++ b/Doc/library/pkgutil.rst
@@ -81,7 +81,7 @@
.. versionchanged:: 3.3
Updated to be based directly on :mod:`importlib` rather than relying
- on a package internal PEP 302 import emulation.
+ on the package internal PEP 302 import emulation.
.. function:: get_importer(path_item)
@@ -96,7 +96,7 @@
.. versionchanged:: 3.3
Updated to be based directly on :mod:`importlib` rather than relying
- on a package internal PEP 302 import emulation.
+ on the package internal PEP 302 import emulation.
.. function:: get_loader(module_or_name)
@@ -115,7 +115,7 @@
.. versionchanged:: 3.3
Updated to be based directly on :mod:`importlib` rather than relying
- on a package internal PEP 302 import emulation.
+ on the package internal PEP 302 import emulation.
.. function:: iter_importers(fullname='')
@@ -133,12 +133,12 @@
.. versionchanged:: 3.3
Updated to be based directly on :mod:`importlib` rather than relying
- on a package internal PEP 302 import emulation.
+ on the package internal PEP 302 import emulation.
.. function:: iter_modules(path=None, prefix='')
- Yields ``(module_loader, name, ispkg)`` for all submodules on *path*, or, if
+ Yields ``(module_finder, name, ispkg)`` for all submodules on *path*, or, if
path is ``None``, all top-level modules on ``sys.path``.
*path* should be either ``None`` or a list of paths to look for modules in.
@@ -146,19 +146,19 @@
*prefix* is a string to output on the front of every module name on output.
.. note::
- Only works with a :term:`finder` which defines an ``iter_modules()``
- method, which is non-standard but implemented by classes defined in this
- module.
+ Only works for a :term:`finder` which defines an ``iter_modules()``
+ method. This interface is non-standard, so the module also provides
+ implementations for :class:`importlib.machinery.FileFinder` and
+ :class:`zipimport.zipimporter`.
.. versionchanged:: 3.3
- As of Python 3.3, the import system provides finders by default, but they
- do not include the non-standard ``iter_modules()`` method required by this
- function.
+ Updated to be based directly on :mod:`importlib` rather than relying
+ on the package internal PEP 302 import emulation.
.. function:: walk_packages(path=None, prefix='', onerror=None)
- Yields ``(module_loader, name, ispkg)`` for all modules recursively on
+ Yields ``(module_finder, name, ispkg)`` for all modules recursively on
*path*, or, if path is ``None``, all accessible modules.
*path* should be either ``None`` or a list of paths to look for modules in.
@@ -184,13 +184,14 @@
walk_packages(ctypes.__path__, ctypes.__name__ + '.')
.. note::
- Only works for a :term:`finder` which define an ``iter_modules()`` method,
- which is non-standard but implemented by classes defined in this module.
+ Only works for a :term:`finder` which defines an ``iter_modules()``
+ method. This interface is non-standard, so the module also provides
+ implementations for :class:`importlib.machinery.FileFinder` and
+ :class:`zipimport.zipimporter`.
.. versionchanged:: 3.3
- As of Python 3.3, the import system provides finders by default, but they
- do not include the non-standard ``iter_modules()`` method required by this
- function.
+ Updated to be based directly on :mod:`importlib` rather than relying
+ on the package internal PEP 302 import emulation.
.. function:: get_data(package, resource)