summaryrefslogtreecommitdiffstats
path: root/Lib/site.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-10-25 19:39:26 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-10-25 19:39:26 (GMT)
commit3b2f0f045903ba9f24d92c053bd6d0fc8561973f (patch)
treed3bcca7df65ba9eab3136f66dd93b875cda70c54 /Lib/site.py
parent79aa68dfc1ab4936107f9528d939e865f94da4b6 (diff)
downloadcpython-3b2f0f045903ba9f24d92c053bd6d0fc8561973f.zip
cpython-3b2f0f045903ba9f24d92c053bd6d0fc8561973f.tar.gz
cpython-3b2f0f045903ba9f24d92c053bd6d0fc8561973f.tar.bz2
Issue #19375: The site module adding a "site-python" directory to sys.path, if it exists, is now deprecated.
Diffstat (limited to 'Lib/site.py')
-rw-r--r--Lib/site.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/site.py b/Lib/site.py
index bb329b4..b0d8268 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -326,6 +326,11 @@ def addsitepackages(known_paths, prefixes=None):
"""Add site-packages (and possibly site-python) to sys.path"""
for sitedir in getsitepackages(prefixes):
if os.path.isdir(sitedir):
+ if "site-python" in sitedir:
+ import warnings
+ warnings.warn('"site-python" directories will not be '
+ 'supported in 3.5 anymore',
+ DeprecationWarning)
addsitedir(sitedir, known_paths)
return known_paths