-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
fix auth cache to allow for username in index url #10288
Conversation
@uranusjr I have confirmed that this patch resolves my original issue. I can't get tox to run the tests properly, but at least the ones in test_network_auth.py are all passing. |
ping @uranusjr |
👍 I am also running into this issue and it looks like this PR would fix it. The rapid 401 requests against our private Artifactory hosted Pypi repo is causing Artifactory to return 403s, which causes pip to fail out. |
@uranusjr Is there something more I need to do? The merge gate shows it is waiting on a news entry, but I included one in my PR. |
Likely not, this should be good. Feel free to ping maintainers if this stay unmerged in October though, to make sure this go into 21.3. |
Close-reopen to trigger CI again. The news entry check was stuck for unknown reason. |
35e299b
to
d05d3c1
Compare
@uranusjr I had to fix a linter issue. Can you re-trigger the workflow? |
I'm not a 100% familiar with the history of this PR, so I'm not gonna click the merge button on this one. @uranusjr has approved this though, so I'll defer to him for merging this. :) |
Currently, if the index url itself contains a username, and the password comes from keyring, then the auth cache is never consulted on subsequent requests. This leads to the undesirable behavior of continually spamming the repository with unauthenticated requests, and also spamming keyring with password lookups. This fixes the auth cache lookup logic to work for this case as well.
Fixes #10269 (in spirit).