summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-01-25 18:57:16 (GMT)
committerBrett Cannon <brett@python.org>2013-01-25 18:57:16 (GMT)
commit13252b877016aa5380f4ae36fb024671c2ea77db (patch)
treeb3648fab23f5a4bdb94f58607720c2a66dc918e7
parent686e880f20a38918c8341aaf6bc14420890d36a2 (diff)
downloadcpython-13252b877016aa5380f4ae36fb024671c2ea77db.zip
cpython-13252b877016aa5380f4ae36fb024671c2ea77db.tar.gz
cpython-13252b877016aa5380f4ae36fb024671c2ea77db.tar.bz2
Issue #16972: Have site.addpackage() consider known paths even when
none are explicitly passed in.
-rw-r--r--Lib/site.py2
-rw-r--r--Misc/NEWS3
2 files changed, 4 insertions, 1 deletions
diff --git a/Lib/site.py b/Lib/site.py
index c4c8ea0..732e1c4 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -146,7 +146,7 @@ def addpackage(sitedir, name, known_paths):
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
index 6a8c24c..c7e2034 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -218,6 +218,9 @@ Core and Builtins
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.