On Wed, Aug 2, 2017, at 01:05 PM, Nick Coghlan wrote:
I wouldn't say that, as the two most clearly side effect free ways of putting the source directory on sys.path are:
1. make it the current working directory for a "python -m" or "python -c" invocation, so that the current directory gets injected as sys.path[0] by the interpreter. After all, it's already a requirement in the PEP that the current working directory be the directory containing pyproject.toml, so this approach handles that as well. 2. run a backend script directly (so it's the script directory that gets implicitly added to sys.path by the interpreter), and then inject the current working directory as sys.path[0] before importing the nominated backend
If a frontend decides to go messing about with PYTHONPATH instead of doing either of those, then that's on them (and after it breaks horribly, they'll hopefully realise the error of their ways and switch to one of the other more reliable approaches).
Nathaniel, can you live with the source directory being on sys.path to load the hooks? Or would you like to have another go at convincing people that it shouldn't be? Thomas