This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author meribold
Recipients meribold
Date 2018-05-10.14:57:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1525964254.05.0.682650639539.issue33456@psf.upfronthosting.co.za>
In-reply-to
Content
PEP 405 says this:

> By default, a virtual environment is entirely isolated from the system-level site-packages directories.
>
> If the pyvenv.cfg file also contains a key include-system-site-packages with a value of true (not case sensitive), the site module will also add the system site directories to sys.path after the virtual environment site directories.

The documentation of the site module (https://docs.python.org/3/library/site.html) says (emphasis added):

> If pyvenv.cfg […] contains the key include-system-site-packages set to anything other than false (case-insensitive), the system-level prefixes will still also be searched for site-packages; *otherwise they won’t*.

However, what actually happens in site.py is different: see <https://github.com/python/cpython/blob/3.6/Lib/site.py#L447>.  The system_site variable is initialized to "true" and doesn't change unless the key include-system-site-packages exists in pyvenv.cfg.

I think system_site should be initialized to "false" and the condition in line 468 should be `if system_site.lower() != "false"`.
History
Date User Action Args
2018-05-10 14:57:34meriboldsetrecipients: + meribold
2018-05-10 14:57:34meriboldsetmessageid: <1525964254.05.0.682650639539.issue33456@psf.upfronthosting.co.za>
2018-05-10 14:57:33meriboldlinkissue33456 messages
2018-05-10 14:57:33meriboldcreate