-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-82419: Improve site docs to clarify user site-packages disabling #125083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -190,7 +190,13 @@ Module contents | |||||
| was disabled by user request (with :option:`-s` or | ||||||
| :envvar:`PYTHONNOUSERSITE`). ``None`` means it was disabled for security | ||||||
| reasons (mismatch between user or group id and effective id) or by an | ||||||
| administrator. | ||||||
| administrator. Note that :func:`getusersitepackages` and :func:`getuserbase` | ||||||
| don't take this variable into account. The check for :data:`ENABLE_USER_SITE` and | ||||||
| modification of ``sys.path`` occurs later. To disable user site-packages, | ||||||
|
||||||
| modification of ``sys.path`` occurs later. To disable user site-packages, | |
| modification of ``sys.path`` occur later. To disable user site-packages, |
(two things occur)
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should refer to the site module, not to the Lib/site.py file that only exists with that name in cpython repo, not after installation 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe something like: rather than try to edit site.py to make it clear we’re talking about the file, not the module (which is something living in the memory of a python interpreter)
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would delete that last sentence, it repeats info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s add some breathing space: