summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2014-05-09 14:37:55 (GMT)
committerBrett Cannon <brett@python.org>2014-05-09 14:37:55 (GMT)
commitf25f25796bbd0ad51fa6b6f57a8c5c7efdf4371f (patch)
treea8c01c5f289cdd48b7dfce63dac78976405fbeda /Doc
parent10c2dba8b26e22b239227775a87fd5931a1ef187 (diff)
parentf26702b86ee0dd12b0031e14eb648c734a20b58a (diff)
downloadcpython-f25f25796bbd0ad51fa6b6f57a8c5c7efdf4371f.zip
cpython-f25f25796bbd0ad51fa6b6f57a8c5c7efdf4371f.tar.gz
cpython-f25f25796bbd0ad51fa6b6f57a8c5c7efdf4371f.tar.bz2
Merge for issue #21157
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/imp.rst12
1 files changed, 8 insertions, 4 deletions
diff --git a/Doc/library/imp.rst b/Doc/library/imp.rst
index ed4820e..c2dbdc5 100644
--- a/Doc/library/imp.rst
+++ b/Doc/library/imp.rst
@@ -79,7 +79,9 @@ This module provides an interface to the mechanisms used to implement the
When *P* itself has a dotted name, apply this recipe recursively.
.. deprecated:: 3.3
- Use :func:`importlib.find_loader` instead.
+ Use :func:`importlib.util.find_spec` instead unless Python 3.3
+ compatibility is required, in which case use
+ :func:`importlib.find_loader`.
.. function:: load_module(name, file, pathname, description)
@@ -104,9 +106,11 @@ This module provides an interface to the mechanisms used to implement the
.. deprecated:: 3.3
If previously used in conjunction with :func:`imp.find_module` then
- call ``load_module()`` on the returned loader. If you wish to load a
- module from a specific file, then use one of the file-based loaders found
- in :mod:`importlib.machinery`.
+ consider using :func:`importlib.import_module`, otherwise use the loader
+ returned by the replacement you chose for :func:`imp.find_module`. If you
+ called :func:`imp.load_module` and related functions directly then use the
+ classes in :mod:`importlib.machinery`, e.g.
+ ``importlib.machinery.SourceFileLoader(name, path).load_module()``.
.. function:: new_module(name)