I think this is far from being proven. Consider the following approach, which fully conforms to Python’s backward compatibility policy (note that I’m not trying to preserve support for every existing .pth file - I don’t think that’s a reasonable constraint, and it’s not what the compatibility policy requires).
- Deprecate the use of anything other than a single module name on an
import line in a .pth file. We can produce a warning when such lines are encountered, and the migration advice is simple - take the content of the import line, put it in an importable module in your package, and replace the line with import <your new module>.
- Complete the deprecation by rejecting
import lines that don’t follow the new rules.
- Redefine the semantics of
.pth files to work as if the “normal” lines are what is contained in the paths.dirs list in the .site.toml spec, and the “import” lines are handled like the entrypoints section - but with the action being to import the given module rather than execute the given entry point.
The deprecation in step 1 can be extended as long as we like, but I see no reason why it should be any longer than a normal deprecation, given that the fix is so simple.
Unless there’s a flaw in PEP 829 (see below), I believe step 3 should result in the same behaviour as the current method of executing .pth files. But it allows the future policy model, fine-grained control, and error reporting improvements that PEP 829 offers, without needing a new file format.
I don’t see any significant benefit in using an entry point rather than an importable module - if anything, it has the disadvantage of allowing startup code to be shipped in the same file as normal runtime code, whereas using an importable module makes it clear that everything in that file is startup time code.
There’s no “built in” extensibility, unlike TOML, but frankly, do we even want to extend the functionality here? All of the discussions have been around reducing functionality, so an extensible format seems like an unnecessary luxury. And in any case, if we wanted to extend the .pth format, we could always add new “start of line” keywords. It’s a bit clumsy, but IMO it’s good enough for something that I believe we won’t need in any case 
It’s possible that the switch from processing .pth files in turn, line by line, to a batch process of collecting all files, processing “path extension” lines first and then processing “import” lines could change behaviour. But I can’t come up with an example where this would happen that isn’t clearly artificial. If anyone can find such a case, please describe it, as it’s probably also a case where PEP 829 won’t act as a valid replacement for .pth files.
The one downside of this plan is that people can’t opt into the new semantics early. But given how little benefit they gain for themselves by doing so, I don’t think this is a major issue. I know, for example, that I will probably just ignore PEP 829 for all of my projects until forced to adopt it when CPython actually removes support for .pth files altogether.
Thoughts? I’d rather not have to write this up as a competing PEP - it’s a lot of work just to resolve a difference of opinion on the file format, and it forces the SC to judge between two almost-identical PEPs, something I’m sure they’d prefer not to do, if only because they would be bound to disappoint one group of people in that case. But I’m not sure I can support PEP 829 in its current form.