-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fix fatal config set error #13535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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. |
logger.warning( | ||
"PIP_CONFIG_FILE is set to '{}'. " | ||
"Applying changes to this file instead of '{}' config. " | ||
"Note that some commands may not reflect these changes " | ||
"as this config file is outside pip's normal config scopes. " | ||
"Please inspect the file manually or unset " | ||
"PIP_CONFIG_FILE for typical behavior.".format( | ||
env_config_file, self.load_only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not quite sure I follow what this is trying to say, you can you give me a high level description of what you want to convey to the user.
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_FILE
may not be reflected in other commands likepip config get
due to how pip loads config scopes.Would appreciate any feedback on this :).