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

Add cli flag --force-keyring #11029

Closed
wants to merge 5 commits into from

Commits on Dec 14, 2022

  1. Add failing test for the use case of supplying --no-input and having …

    …keyring queried for credentials.
    
    Since there is currently no possible way to get pip to query the keyring when --no-input is used I am not marking the new scenario xfail. That should change once there is some way to do that.
    Darsstar authored and Dos Moonen committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    51475ec View commit details
    Browse the repository at this point in the history
  2. Add cli flag --force-keyring.

    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.
    
    This commit adds a flag to force keyring usage if it is installed. It defaults to `False`, making this opt-in behaviour.
    
    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.
    Dos Moonen committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    497761c View commit details
    Browse the repository at this point in the history
  3. Parameterized tests/functional/test_install_config.py::test_prompt_fo…

    …r_keyring_if_needed to add a few --no-input and --force-keyring scenarios
    Darsstar authored and Dos Moonen committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    629de94 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2023

  1. Added a news entry and some documentation about --force-keyring

    Darsstar authored and Dos Moonen committed Jan 5, 2023
    Configuration menu
    Copy the full SHA
    fe03e9c View commit details
    Browse the repository at this point in the history
  2. Unpin pytest in .pre-commit-config.yaml and remove `type: ignore[attr…

    …-defined]` comments that are no longer needed as of pytest 7.1.3
    Dos Moonen committed Jan 5, 2023
    Configuration menu
    Copy the full SHA
    7fd045c View commit details
    Browse the repository at this point in the history