[New-bugs-announce] [issue38238] site.py reporting user site info even if ENABLE_USER_SITE=False

Barry Muldrey report at bugs.python.org
Fri Sep 20 15:34:35 EDT 2019


New submission from Barry Muldrey <python at muxing.io>:

site info is accessed externally via getusersitepackages() and getuserbase()... for example see "pip/_internal/locations.py"

If ENABLE_USER_SITE is set to "False," or otherwise disabled,
accesses to these methods should return '' or None (shouldn't they?).

Currently, I have ENABLE_USER_SITE globally disabled (by various means), but pip's call to getusersitepackages() is still returning "~/.local/lib/...".

This seems wrong.  An alternative would be for external tools to manually import site.ENABLE_USER_SITE, but this seems incorrect.

----------
components: Library (Lib)
messages: 352884
nosy: bjmuld
priority: normal
severity: normal
status: open
title: site.py reporting user site info even if ENABLE_USER_SITE=False
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38238>
_______________________________________


More information about the New-bugs-announce mailing list