]> granicus.if.org Git - python/commitdiff
Issue #17176: Document that imp.NullImporter is no longer
authorBrett Cannon <brett@python.org>
Wed, 13 Mar 2013 17:58:50 +0000 (10:58 -0700)
committerBrett Cannon <brett@python.org>
Wed, 13 Mar 2013 17:58:50 +0000 (10:58 -0700)
automatically used by import.

Doc/library/imp.rst
Doc/library/sys.rst

index 5cadda9d4c1c37431040fa65beda4436c93eb7fd..60d01055b797e397621b5b1a7afcd4d37c7c5e0c 100644 (file)
@@ -326,16 +326,17 @@ to indicate the search result of :func:`find_module`.
    with an existing directory or empty string raises :exc:`ImportError`.
    Otherwise, a :class:`NullImporter` instance is returned.
 
-   Python adds instances of this type to ``sys.path_importer_cache`` for any path
-   entries that are not directories and are not handled by any other path hooks on
-   ``sys.path_hooks``.  Instances have only one method:
-
+   Instances have only one method:
 
    .. method:: NullImporter.find_module(fullname [, path])
 
       This method always returns ``None``, indicating that the requested module could
       not be found.
 
+   .. versionchanged:: 3.3
+      ``None`` is inserted into ``sys.path_importer_cache`` instead of an
+      instance of :class:`NullImporter`.
+
 
 .. _examples-imp:
 
index aad32d2bfb32d2ac06ed4cebfaeb563042f94c4a..7745559defe9573a240d787b35ace23413ada023 100644 (file)
@@ -770,12 +770,15 @@ always available.
     A dictionary acting as a cache for :term:`finder` objects. The keys are
     paths that have been passed to :data:`sys.path_hooks` and the values are
     the finders that are found. If a path is a valid file system path but no
-    explicit finder is found on :data:`sys.path_hooks` then ``None`` is
-    stored to represent the implicit default finder should be used. If the path
-    is not an existing path then :class:`imp.NullImporter` is set.
+    finder is found on :data:`sys.path_hooks` then ``None`` is
+    stored.
 
     Originally specified in :pep:`302`.
 
+    .. versionchanged:: 3.3
+       ``None`` is stored instead of :class:`imp.NullImporter` when no finder
+       is found.
+
 
 .. data:: platform