
To be clear, I'm not a big fan of ".pth" files either, but it is a mechanism that already exists today and has broad (although admittedly not universal) support.
I wasn't aware of any discussions about deprecating support for ".pth" files. If that's the case, then I agree it's not a good idea to expand their use.
I think the behavior that makes people uneasy about .pth files is the fact
El sáb, 7 may 2022 a las 18:21, Eric Traut (<eric@traut.com>) escribió: that lines starting with "import " are exec-ed (as documented at https://docs.python.org/3/library/site.html). That behavior has some clear security and predictability issues and is hard for static type checkers to follow. However, I don't think the .pth file behavior that simply adds directories to the $PATH is as controversial.