On Wed, 31 Mar 2021 at 11:01, Barry Warsaw <barry@python.org> wrote:
Kind of :)
PEP 648 would definitely allow us to deprecate the executable part of pth files. I let my own biases leak in to my response because I would like to find a way to replace the sys.path feature of pth with something much more auditable and discoverable. To me that means deprecating pth files and finding something better, but maybe not.
Adding pth file auditing to the output of "python -m site" should be entirely feasible, it just hasn't been done yet. Even if it just listed the files found, it would make them easier to audit than they are today. Declaring the feature impossible to audit when we haven't even really tried to make it auditable seems premature (the existing site output doesn't even indicate which paths in sys.path will be considered when looking for pth files, let alone indicate which of those directories actually contain any). Cheers, Nick.