gh-120037: Disable user site packages when a ._pth file is used (GH-137428)

This commit is contained in:
Steve Dower 2025-08-19 21:28:28 +01:00 committed by GitHub
parent e39255e76d
commit 7d06a0af17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 19 additions and 0 deletions

View file

@ -790,6 +790,7 @@ def search_up(prefix, *landmarks, test=isfile):
config['isolated'] = 1
config['use_environment'] = 0
config['site_import'] = 0
config['user_site_directory'] = 0
config['safe_path'] = 1
pythonpath = []
for line in pth: