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

do not suppress --no-input argument #7540

Closed
wants to merge 1 commit into from
Closed

do not suppress --no-input argument #7540

wants to merge 1 commit into from

Conversation

cs01
Copy link
Member

@cs01 cs01 commented Jan 2, 2020

This PR removes suppression of the --no-input argument, which has existed in pip since 2010.

Unit tests already exist for this argument.

def test_no_input(self):
options1, args1 = main(['--no-input', 'fake'])
options2, args2 = main(['fake', '--no-input'])
assert options1.no_input
assert options2.no_input

After 5 years, nobody has raised any objections on #2429 for why this option is hidden. I recently was made aware of the --no-input flag, and would never have known about it had @chrahunt not mentioned it. I plan to use it in pipx to resolve pypa/pipx#219.

@chrahunt
Copy link
Member

chrahunt commented Jan 2, 2020

I don't see any functional tests that check:

  1. we prompt as expected when hitting an endpoint that demands auth (returns 401)
  2. we don't prompt in the same situation when --no-input is provided on the command line

It would be a good idea to have these before we "officially" support the flag, to avoid regressions.

We can probably put something together that returns 401 when needed (and verifying that it was called) using the server test helper. We may want to pull in e.g. pexpect for the interactive part of the positive test case.

@sbidoul sbidoul added the C: cli Command line interface related things (optparse, option grouping etc) label Jan 2, 2020
@cs01
Copy link
Member Author

cs01 commented Jan 19, 2020

Unfortunately I'm afraid I don't have the time to dedicate to set up more functional tests. Let me know if you'd like me to withdraw this PR, or if you'd like to keep it open and push to it (edits are allowed from maintainers).

@chrahunt
Copy link
Member

chrahunt commented Feb 2, 2020

No worries. I created #7688 to track adding docs/tests for this, so I'll close this now. 👍

@chrahunt chrahunt closed this Feb 2, 2020
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Mar 10, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: cli Command line interface related things (optparse, option grouping etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pipx install doesn't prompt for credentials for private vcs url
3 participants