summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-06-15 23:39:06 (GMT)
committerBrett Cannon <brett@python.org>2012-06-15 23:39:06 (GMT)
commit0450c9ed52deccd087c56b4da36f02c800c604a5 (patch)
tree9224e6b961c696cccb36735c78a247901104f01b
parent47b3239cc64958b516492a1227b43c6f0b3be65f (diff)
downloadcpython-0450c9ed52deccd087c56b4da36f02c800c604a5.zip
cpython-0450c9ed52deccd087c56b4da36f02c800c604a5.tar.gz
cpython-0450c9ed52deccd087c56b4da36f02c800c604a5.tar.bz2
Issue #13959: Add to imp.find_module() and load_module's docstrings
that they are deprecated (previous commit documented this fact in the module docs).
-rw-r--r--Lib/imp.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/imp.py b/Lib/imp.py
index edef0be..8c89237 100644
--- a/Lib/imp.py
+++ b/Lib/imp.py
@@ -150,9 +150,10 @@ def load_package(name, path):
return _bootstrap.SourceFileLoader(name, path).load_module(name)
-# XXX deprecate
def load_module(name, file, filename, details):
- """Load a module, given information returned by find_module().
+ """**DEPRECATED**
+
+ Load a module, given information returned by find_module().
The module name must include the full package name, if any.
@@ -180,9 +181,10 @@ def load_module(name, file, filename, details):
raise ImportError(msg, name=name)
-# XXX deprecate
def find_module(name, path=None):
- """Search for a module.
+ """**DEPRECATED**
+
+ Search for a module.
If path is omitted or None, search for a built-in, frozen or special
module and continue search in sys.path. The module name cannot