-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
What's the problem this feature will solve?
Currently, Pip is conservative and does not query keyring at all when --no-input is used because the keyring might require user interaction such as prompting the user on the console.
Tools such as Pipx and Pipenv use Pip and have their own progress indicator that hides output from the subprocess Pip runs in. They should pass --no-input in my opinion, but Pip should provide some mechanism to still query the keyring in that case. Just not by default. So here we are.
Describe the solution you'd like
A flag to pinky swear that the configured keyring backend does not require any user interaction. It defaults to False, making this opt-in behaviour.
Alternative Solutions
Hardcoding a Personal Access Token in the index url and then probably wondering why things stopped working when it expires.
Additional context
The three UX situations I encountered that would be improved:
- Using: keyrings.google-artifactregistry-auth pipenv update -d fails hard. pipenv#4706 (comment)
Pipenv passes--no-inputwhen resolving, as of 2020.05.29 if I recall correctly, causing locking to fail. Passing--skip-lockto theinstallcommand or using thesynccommand lets us install from a Pipfile.lock, but to generate/update a Pipfile.lock we need to hardcode credentials in the url thelockcommand uses. - pipx install doesn't prompt for credentials for private vcs url pipx#219
I intend to add a PR for Pipx to pass--no-inputbut passing--pip-args="--no-input"is a workaround that would work if the feature this issue requests is added. - Virtualenv's
app-dataseeder setsPIP_NO_INPUTto a truthy value when it tries to download newer versions.
This is issue for the PR I am working on, for which I need a issue number.
Code of Conduct
- I agree to follow the PSF Code of Conduct.