[issue33944] Deprecate and remove pth files

Nick Coghlan report at bugs.python.org
Tue Jan 15 07:53:04 EST 2019


Nick Coghlan <ncoghlan at gmail.com> added the comment:

`site.addsitedir` is called for every site-packages directory (whether global, within a venv, or at the user level), so my proposal above covers appending multiple segments.

Linux distros approach to handling this is terrible because they dump all their system packages into a single global site-packages, leading to the every growing sys.path problem that Barry is concerned about.

However, that's entirely the fault of distro packaging policies, and can be remedied in a far superior way by switching distros to a model where they create a venv per application, and then use .pth files to link in the system packages that they actually want visible to that application.

"Some users don't want to use virtual environments appropriately" is an incredibly poor reason for breaking a perfectly valid feature.

----------

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


More information about the Python-bugs-list mailing list