Message 333638 - Python tracker (original) (raw)

On Jan 14, 2019, at 04:02, STINNER Victor <report@bugs.python.org> wrote:

I really hate .pth files because the slow down Python startup time for all applications whereas .pth files are usually specific to a very few applications using one or two specific modules.

They can also modify the behavior of Python for all applications, with no way to opt-out.

I would prefer to have an opt-in option, disabled by default.

I completely agree. The other problem is that .pth-caused problems are very difficult to diagnose and debug. Essentially you have to hack site.py to break into the loading machinery. I have to believe that we can come up with a better mechanism that doesn’t suffer from these problems.

Do we have a single place to capture a list of .pth use cases?