Issue33456
Created on 2018-05-10 14:57 by meribold, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 6755 | merged | meribold, 2018-05-10 15:30 | |
| Messages (2) | |||
|---|---|---|---|
| msg316367 - (view) | Author: Lukas Waymann (meribold) * | Date: 2018-05-10 14:57 | |
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"`. |
|||
| msg339711 - (view) | Author: Vinay Sajip (vinay.sajip) * ![]() |
Date: 2019-04-09 07:27 | |
New changeset c324c748871804f31f56b3bd02a8650b3bf1bae7 by Vinay Sajip (Lukas Waymann) in branch 'master': bpo-33456: site module documentation - fix wrong default for key in pyvenv.cfg (GH-6755) https://github.com/python/cpython/commit/c324c748871804f31f56b3bd02a8650b3bf1bae7 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:00 | admin | set | github: 77637 |
| 2019-04-09 07:30:51 | vinay.sajip | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-04-09 07:27:40 | vinay.sajip | set | messages: + msg339711 |
| 2019-04-08 21:48:35 | cheryl.sabella | set | nosy:
+ vinay.sajip, cheryl.sabella, docs@python assignee: docs@python |
| 2018-05-10 15:30:46 | meribold | set | keywords:
+ patch stage: patch review pull_requests: + pull_request6442 |
| 2018-05-10 14:57:34 | meribold | create | |
