Skip to content
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

Improve pip config --help text #11074

Merged
merged 1 commit into from
Apr 29, 2022
Merged

Conversation

wimglenn
Copy link
Contributor

@wimglenn wimglenn commented Apr 29, 2022

The https://pip.pypa.io/en/stable/cli/pip_config/ page and corresponding pip config --help output is not very useful, I've lost count of the number of times I've seen this kind of error message:

$ pip config set index-url http://localhost:8080/
ERROR: Key does not contain dot separated section and key. Perhaps you wanted to use 'global.index-url' instead?

It's also pretty confusing that there is a --global option for the command and a global.option prefix for config keys with the word "global" here meaning quite different things, unless you've visit another section of the documentation which explains that the prefix is for per-command configuration.

Today I saw a user struggling to configure pip in a venv and reported:

Ah! I kept using site.extra-index-url thinking I was meant to replace global with site rather than adding it as an option.

This change hopefully makes the pip config --help clearer.

@pradyunsg pradyunsg changed the title improve pip config --help text Improve pip config --help text Apr 29, 2022
@pradyunsg pradyunsg merged commit 6313d86 into pypa:main Apr 29, 2022
@pradyunsg
Copy link
Member

This looks great! Thanks @wimglenn! :)

@wimglenn wimglenn deleted the pip-config-help branch April 29, 2022 15:45
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants