Place for project-level user-specific config


There is no good place to put configuration that is both project-specific and per-user. An example of this is where to find the virtualenv(s) for a project. Another example is poetry requires pip config in pyproject.toml, but that means it needs to be shared by all developers of a project.

Proposed Solution

Add a new TOML file, perhaps .pythonconfig, that tools will look for that holds this information. This seems nicer than proposals which require having something that might be a file or a virtualenv. It also has the plus side of being quite flexible and allowing for other configuration as well. Because of established conventions for pyproject.toml, I think this could be relatively easy to implement.

I can see some potential issues that are created by not having a single file where everything goes. It is also true that for the majority of users this would only include virtualenv info. But these I see as minor downsides for something that would be quite convenient and there is no good solution for currently.

I wonder if this (or at least part of it maybe) could be a good use case for something like the proposal here: Proposal: overrides for installers (there are other related proposals around that might be a good fit as well, some are linked).

I agree that there is a hole to fill in this area: settings that should not be pushed to the source code repository but should override the project’s settings.

@dbrydon, are you referring to this discussion in particular?

Yes, although similar discussions also occurred in the PEP 704 thread.