[Python-checkins] cpython: Issue #16972: Have site.addpackage() consider known paths even when

brett.cannon python-checkins at python.org
Fri Jan 25 19:57:24 CET 2013


http://hg.python.org/cpython/rev/2c0197c95ec6
changeset:   81736:2c0197c95ec6
user:        Brett Cannon <brett at python.org>
date:        Fri Jan 25 13:57:16 2013 -0500
summary:
  Issue #16972: Have site.addpackage() consider known paths even when
none are explicitly passed in.

files:
  Lib/site.py |  2 +-
  Misc/NEWS   |  3 +++
  2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Lib/site.py b/Lib/site.py
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -146,7 +146,7 @@
        and add that to known_paths, or execute it if it starts with 'import '.
     """
     if known_paths is None:
-        _init_pathinfo()
+        known_paths = _init_pathinfo()
         reset = 1
     else:
         reset = 0
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -218,6 +218,9 @@
 Library
 -------
 
+- Issue #180022: Have site.addpackage() consider already known paths even when
+  none are explicitly passed in. Bug report and fix by Kirill.
+
 - Issue #1602133: on Mac OS X a shared library build (``--enable-shared``)
   now fills the ``os.environ`` variable correctly.
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list