On Wed, Feb 24, 2021, at 06:27, Christian Heimes wrote:
> Separate directories don't prevent clashes and system breakage. But they
> provide an easy way to *recover* from a broken system.

I think it could be turned into a way to prevent them by A) having 
site-packages always take precedence over dist-packages [i believe this is 
already the case] in normal usage and B) providing an option to the 
interpreter, used by system scripts, to exclude site-packages entirely from the 
path.

Basically, site-packages would effectively be layered on top of "Lib + 
dist-packages" in a similar way to how a venv is layered on top of the main 
python installation - the inverse of the suggestion someone else in the thread 
made for the system python to be a venv. This wouldn't *exactly* be a venv 
because it wouldn't imply the other things that entering a venv does such as 
"python" [and script names such as pip] being an alias for the correct version 
of python, but it would provide the same kind of one-way isolation, whereby the 
"system environment" can influence the "normal environment" and not vice-versa, 
in the same way that packages installed in the main installation affect a venv 
[unless system-site-packages is disabled] but the venv obviously has no effect 
on the main installation.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/K3DB2MSBWPDEK3O4UZ5VEQVKW7BFZDRU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to