bpo-33456: site.py: fix wrong default for key in pyvenv.cfg#6755
bpo-33456: site.py: fix wrong default for key in pyvenv.cfg#6755vsajip merged 2 commits intopython:masterfrom
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. When your account is ready, please add a comment in this pull request Thanks again to your contribution and we look forward to looking at it! |
vsajip
left a comment
There was a problem hiding this comment.
Given that no complaints have been received about the implemented behaviour, it would seem better to update the documentation to match the implemented behaviour rather than the other way around.
You can change the patch to update the documentation, if you like.
|
Yeah, I can do that. Should I also create a PR for the PEP? |
|
Just for the record, I think my proposed change doesn't affect virtual environments created with the |
|
|
||
| if candidate_confs: | ||
| virtual_conf = candidate_confs[0] | ||
| system_site = "true" |
There was a problem hiding this comment.
Any reason we use a string here instead of a bool?
There was a problem hiding this comment.
It's parsed by C code during startup, so parsing facilities are limited.
|
@meribold I don't believe you need to update the PEP. It was the vehicle for getting the feature approved for inclusion into Python, but the documentation of the feature takes precedence IMO. |
|
I reverted my commit and changed the sentence in
|
PEP 405 says this:
The documentation of the
sitemodule says (emphasis added):However, what actually happens in
site.pyis different: see https://github.com/python/cpython/blob/3.6/Lib/site.py#L447. Thesystem_sitevariable is initialized to"true"and doesn't change unless the keyinclude-system-site-packagesexists inpyvenv.cfg.I think
system_siteshould be initialized to"false"so the actual behavior matches the documented behavior.https://bugs.python.org/issue33456