]> granicus.if.org Git - python/commitdiff
Issue #13959: Document imp.find_module/load_module as deprecated.
authorBrett Cannon <brett@python.org>
Sun, 13 May 2012 17:04:21 +0000 (13:04 -0400)
committerBrett Cannon <brett@python.org>
Sun, 13 May 2012 17:04:21 +0000 (13:04 -0400)
The code itself does not raise a DeprecationWarning as the functions
are technically fine, it's just a bad API. Unfortunately experience
has shown that the terrible API has been exposed in various places,
necessitating that it stick around probably until py4k comes around
since it is such a shift to move over to importlib.find_loader().

Doc/library/imp.rst
Misc/NEWS

index 7e5f8dc602d9a5d763e788110f332f4e0322ec41..d54bd9dde9e79a6655c59abb2394fb91567c0d1a 100644 (file)
@@ -72,6 +72,9 @@ This module provides an interface to the mechanisms used to implement the
    then use :func:`find_module` with the *path* argument set to ``P.__path__``.
    When *P* itself has a dotted name, apply this recipe recursively.
 
+   .. deprecated:: 3.3
+      Use :func:`importlib.find_loader` instead.
+
 
 .. function:: load_module(name, file, pathname, description)
 
@@ -93,6 +96,10 @@ This module provides an interface to the mechanisms used to implement the
    it was not ``None``, even when an exception is raised.  This is best done
    using a :keyword:`try` ... :keyword:`finally` statement.
 
+   .. deprecated:: 3.3
+      Unneeded as loaders should be used to load modules and
+      :func:`find_module` is deprecated.
+
 
 .. function:: new_module(name)
 
index 83257ab50b96c79d65b52d82086f8af729b50c30..5458385a8044d441c11bfefca9dab62abfd258e6 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -26,7 +26,8 @@ Library
 - Issue #14366: Support lzma compression in zip files.
   Patch by Serhiy Storchaka.
 
-- Issue #13959: Introduce importlib.find_loader().
+- Issue #13959: Introduce importlib.find_loader() and document
+  imp.find_module/load_module as deprecated.
 
 - Issue #14082: shutil.copy2() now copies extended attributes, if possible.
   Patch by Hynek Schlawack.