diff options
author | Miss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-10-11 18:21:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-11 18:21:31 (GMT) |
commit | 1006f63a8b4327e8a74eb978b175b5234bb46c6c (patch) | |
tree | 0fba38ffe41e9c4641e33be564527f900e807a56 /Lib | |
parent | b15fff620f8e7ef3353300dff69706e300123cab (diff) | |
download | cpython-1006f63a8b4327e8a74eb978b175b5234bb46c6c.zip cpython-1006f63a8b4327e8a74eb978b175b5234bb46c6c.tar.gz cpython-1006f63a8b4327e8a74eb978b175b5234bb46c6c.tar.bz2 |
bpo-41376: Fix the documentation of `site.getusersitepackages()` (GH-21602) (GH-22592)
`site.getusersitepackages()` returns the location of the user-specific site-packages directory
even when the user-specific site-packages is disabled.
```
$ python -s -m site
sys.path = [
'/home/user/conda/lib/python37.zip',
'/home/user/conda/lib/python3.7',
'/home/user/conda/lib/python3.7/lib-dynload',
'/home/user/conda/lib/python3.7/site-packages',
]
USER_BASE: '/home/user/.local' (exists)
USER_SITE: '/home/user/.local/lib/python3.7/site-packages' (doesn't exist)
ENABLE_USER_SITE: False
```
It was not practical to prevent the function from returning None if user-specific site-packages are disabled, since there are other uses of the function which are relying on this behaviour (e.g. `python -m site`).
(cherry picked from commit 35f041dd0171f575fc3adce1709b31fdf45a5ff6)
Co-authored-by: Phil Elson <pelson.pub@gmail.com>
Co-authored-by: Phil Elson <pelson.pub@gmail.com>
Diffstat (limited to 'Lib')
0 files changed, 0 insertions, 0 deletions