summaryrefslogtreecommitdiff
path: root/Doc/library/pkgutil.rst
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-07-09 14:10:23 -0400
committerBrett Cannon <brett@python.org>2012-07-09 14:10:23 -0400
commitb19449751f7e8b83ab6b8669111c111b905a14b7 (patch)
treee154d51d91f84793b31da7ca7bd7653fa704edd8 /Doc/library/pkgutil.rst
parent19a2f5961ce235e9ca9944069b0f5f21b340de9c (diff)
downloadcpython-git-b19449751f7e8b83ab6b8669111c111b905a14b7.tar.gz
Issue #15288: Clarify that pkgutil.walk_packages() and friends will no
longer work as expected in Python 3.3 as importlib's loaders do not implement the non-standard iter_modules() method. Also link to the term "loader" in the requisite notes to help make it clearer what has happened.
Diffstat (limited to 'Doc/library/pkgutil.rst')
-rw-r--r--Doc/library/pkgutil.rst17
1 files changed, 13 insertions, 4 deletions
diff --git a/Doc/library/pkgutil.rst b/Doc/library/pkgutil.rst
index 0aee4e7637..f85bb0bec2 100644
--- a/Doc/library/pkgutil.rst
+++ b/Doc/library/pkgutil.rst
@@ -139,8 +139,13 @@ support.
*prefix* is a string to output on the front of every module name on output.
.. note::
- Only works for importers which define a ``iter_modules()`` method, which
- is non-standard but implemented by classes defined in this module.
+ Only works wtih a :term:`loader` which defines a ``iter_modules()``
+ method, which is non-standard but implemented by classes defined in this
+ module.
+
+ .. versionchanged:: 3.3
+ As of Python 3.3, the import system provides loaders by default, but they
+ do not include the ``iter_modules()`` method required by this function.
.. function:: walk_packages(path=None, prefix='', onerror=None)
@@ -171,8 +176,12 @@ support.
walk_packages(ctypes.__path__, ctypes.__name__ + '.')
.. note::
- Only works for importers which define a ``iter_modules()`` method, which
- is non-standard but implemented by classes defined in this module.
+ Only works for a :term:`loader` which define a ``iter_modules()`` method,
+ which is non-standard but implemented by classes defined in this module.
+
+ .. versionchanged:: 3.3
+ As of Python 3.3, the import system provides loaders by default, but they
+ do not include the ``iter_modules()`` method required by this function.
.. function:: get_data(package, resource)