[issue38238] site.py reporting user site info even if ENABLE_USER_SITE=False

Christian Heimes report at bugs.python.org
Mon Sep 23 06:58:24 EDT 2019


Christian Heimes <lists at cheimes.de> added the comment:

getusersitepackages() and getuserbase() don't take ENABLE_USER_SITE into account. The function simply return the location of the user site-package directory independently of the value of ENABLE_USER_SITE. The check for ENABLE_USER_SITE and modification of sys.path occurs later. The design allows applications to get the hypothetical path for user site-packages independently from the ENABLE_USER_SITE flag.

The API is mature, old, and around since Python 2.6. We can't change it without breaking backwards compatibility.

----------
nosy: +christian.heimes

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


More information about the Python-bugs-list mailing list