STINNER Victor <vstin...@redhat.com> added the comment:

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'm in favor of deprecating the feature in Python 3.8 and remove it from Python 
3.9.

Python 3 already support namespaces which covers the most common use case of 
.pth files, no?

Another use case is to run code if a specific command line option is used or if 
an environment variable is set. For example, my faulthandler backport uses a 
.pth file to enable faulthandler if PYTHONFAULTHANDLER environment variable is 
set. I dislike this .pth file (I didn't write it ;-)). I'm fine with dropping 
this feature as a whole.

We can add a pending deprecation warning in Python 3.7 right now.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33944>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to