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

Incorrect username/password gives misleading error #4834

Closed
wants to merge 3 commits into from
Closed

Incorrect username/password gives misleading error #4834

wants to merge 3 commits into from

Conversation

patter001
Copy link

@patter001 patter001 commented Nov 3, 2017

Pull request to go with issue 4833

Closes #4833

@pradyunsg pradyunsg added state: needs discussion This needs some more discussion type: enhancement Improvements to functionality labels Nov 4, 2017
@xavfernandez
Copy link
Member

xavfernandez commented Nov 4, 2017

I'm not sure we want an InstallationError on this one (meaning the pip install command will fail), a simple logger.warning might maybe be enough ?

return resp

raise InstallationError(
'401 Error, Credentials did not work'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would help the user to know the affected url.

Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xavfernandez requested changes in a comment.

@patter001
Copy link
Author

patter001 commented Nov 5, 2017

I will add the URL. I believe it needs to be error/exception or it will still result in an installation error (as it does now) and you will just have two messages for the one error. I would be happy to change the exact error though. Should I make a new one Error? or would you prefer PipError or ConfigurationError?

@patter001
Copy link
Author

Unfortunately, I don't understand the pypy3 error...It seems to be some time out unrelated to my update that prints the URL.

@pradyunsg
Copy link
Member

pradyunsg commented Nov 7, 2017

@patter001 You'll want to rebase this/merge master since there's been some updates to the CI stuff since you opened this PR.

None the less, I've restarted the failed CI job, it's mostly a transient error. :)

@patter001
Copy link
Author

@pradyunsg Thanks! I see it is passing now, so let me know if there are more changes requested or if this is enough for the merge (the re-base would only be needed if I needed to re-submit more changes right?)

@pradyunsg
Copy link
Member

@xavfernandez's concern about InstallationError seems to not have been addressed yet.


For the news fragment, could you add something relevant for the news file -- like pip now informs user about 401 errors (except worded better)?

I'd really like it if you could add a test otherwise would go away in the next refactor. ;)


the re-base would only be needed if I needed to re-submit more changes right?

If you could merge master into this PR, it would be ideal. There have been some changes in the CI configuration so it would be needed that the tests with that updated configuration.

@patter001
Copy link
Author

I need an answer to my question to better address @xavfernandez's concern...or I'll be happy to just make a new error condition.

There are no existing tests here around a fake host and prompting the username/password to leverage from.

@pradyunsg
Copy link
Member

pradyunsg commented Nov 7, 2017

I need an answer to my question to better address @xavfernandez's concern...or I'll be happy to just make a new error condition.

Oh, I missed that. I'd wait for his response then. :P

There are no existing tests here around a fake host and prompting the username/password to leverage from.

Cool. No issues then.


That makes my remaining concern to just the news fragment. I'll defer to @xavfernandez for the functional parts of this PR.

@patter001
Copy link
Author

Just figured I'd check in: @xavfernandez's do you agree we need InstallationError now? I did try a different error, but those result in tracebacks instead of the nice clean exit...so I'm open to suggestions.

I did the rebase and the news update...still got the random timeout failure. I'm not sure how to re-run that without actually pushing a new change.

@xavfernandez
Copy link
Member

Well if you use several indexes, having a 401 on a single index does not automatically mean you won't be able to perform your install so why completely abort with an InstallationError ?

And if you only have one index, you'll get the cannot find distribution with a red logger.warning indicating the 401 issue.

@patter001
Copy link
Author

patter001 commented Nov 17, 2017 via email

@patter001
Copy link
Author

I have made the modifications to just print the warning.

I did the rebase, but cannot get the python3.3 part to pass (and seem to have no bearing on my changes). Please provide any feedback for whether the patch is sufficient to get merged or not.

@xavfernandez
Copy link
Member

Rebasing on master should fix the 3.3 error.
The empty lines changes are not needed though.

@patter001
Copy link
Author

fixed

@@ -48,6 +48,7 @@

try:
import ssl # noqa

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These newline changes seem unrelated... Could you remove them or is there some reason I'm not seeing?

@patter001 patter001 closed this Jul 26, 2018
@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
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 state: needs discussion This needs some more discussion type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect username/password gives misleading error
4 participants