Fix fatal config set error - #13535
Conversation
|
I think pre-commit is showing weird behavior here again... |
Do you know if there is anything particular about your git workflow? It does seem to be happening with your PRs more than anyone else's (though I have seen it happen at least once to mine). You could perhaps report this to pre-commit, I would normally assist in reporting a bug but my experience with that project means I am not inclined to help it out. In the mean time I'm thinking we should move off pre-commit.ci, and instead just add it as a github workflow, I don't see any advantage to having it run in a separate infrastructure. I'll make an issue and a PR when I have a moment. |
No, I don’t think the issue is on my end. It might be that committing too quickly causes these problems. And sure, I’ll report this as a potential bug to pre-commit. Thanks for your feedback! |
|
Oh great, Windows CI is failing today 😞 , I'll take a look in a min. |
|
Seems like it was a transient error, I'll see if I can add some retry logic on the installing installing SVN step in the future. |
3e8255a to
059a21e
Compare
|
I don't think this PR fully addresses all the review comments yet, I will try and take a look in a few weeks. |
|
Thanks for the ping, I'm going to be away on vacation for a week, but I hope some time in June to sit down and do make a big dent in the backlog of things I've promised to review. |
|
Thanks so much for the thorough reviews, @notatallshaw! I've addressed the remaining points, got I'd appreciate another look when you have a chance! |
|
Hey @ichard26, would you be open to considering adding this to the upcoming release milestone? I believe the latest review comments have been addressed and the requested tests have been added. No worries if it's too late in the release cycle or you'd prefer to leave it for a later release. |
|
TBH, pip's configuration code is one of my least favourite parts of the codebase to make changes. It's a mess to follow1 while being an easy source of backwards compatibility potholes. I'd need to invest a significant amount of time to understand what's the underlying issue here and whether this change is the right solution. So, I consider this PR out of scope for the upcoming 26.2 release. I'll tack to the 26.3 milestone for the time being. Footnotes
|
Fixes #13279
I tried fixing this by providing the user with a helpful error message instead of crashing, and made a new parser to allow writing to the PIP_CONFIG_FILE environment variable temporarily.
One important caveat is that changes made to the config file via
PIP_CONFIG_FILEmay not be reflected in other commands likepip config getdue to how pip loads config scopes.Would appreciate any feedback on this :).