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

Fixed #3569 inability to load credentials from .netrc files #3715

Merged
merged 2 commits into from May 26, 2016

Conversation

Projects
None yet
3 participants
@ssbarnea
Contributor

ssbarnea commented May 24, 2016

Explanation: because the MultiDomainBasicAuth object was always evaluating as true the condition for loading the .netrc was never met so that's why it was not working.

Now I added code to evaluate the object as true/false based on the existence of some secrets being loaded inside the internal dictionary and now the code works well, values from the .netrc are loaded and used.

This change is

This was migrated from pypa/pip#3637 to reparent it to the master branch. Please see original pull request for any previous discussion.

@ssbarnea

This comment has been minimized.

Show comment
Hide comment
@ssbarnea

ssbarnea May 24, 2016

Contributor

@dstufft it seems that it passed the Travis tests. I am looking forward to see this merged in the next patch as I find really ugly to have to include credentials inside URLs as they get exposed in the logs in many occasions.

Contributor

ssbarnea commented May 24, 2016

@dstufft it seems that it passed the Travis tests. I am looking forward to see this merged in the next patch as I find really ugly to have to include credentials inside URLs as they get exposed in the logs in many occasions.

@dstufft dstufft merged commit 2dfe881 into pypa:master May 26, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

waisbrot pushed a commit to waisbrot/pip that referenced this pull request Jul 5, 2016

@xavfernandez

This comment has been minimized.

Show comment
Hide comment
@xavfernandez

xavfernandez Jul 21, 2016

Contributor

This apparently broke the usecase of providing credentials in the url (--index-url=https://username:password@my.pypi.fr) with pip master branch.

Commenting __nonzero__ and __bool__ makes it work again...

Contributor

xavfernandez commented Jul 21, 2016

This apparently broke the usecase of providing credentials in the url (--index-url=https://username:password@my.pypi.fr) with pip master branch.

Commenting __nonzero__ and __bool__ makes it work again...

@xavfernandez

This comment has been minimized.

Show comment
Hide comment
@xavfernandez

xavfernandez Jul 21, 2016

Contributor

I'd guess we are trying to get in there: https://github.com/kennethreitz/requests/blob/fb01456/requests/sessions.py#L376
But at this point, __call__ has not been called yet and self.passwords will always be empty.

Contributor

xavfernandez commented Jul 21, 2016

I'd guess we are trying to get in there: https://github.com/kennethreitz/requests/blob/fb01456/requests/sessions.py#L376
But at this point, __call__ has not been called yet and self.passwords will always be empty.

@xavfernandez

This comment has been minimized.

Show comment
Hide comment
@xavfernandez

xavfernandez Jul 21, 2016

Contributor

@sigmavirus24 sorry to bother but you will certainly have a better idea of what is happening here and how we could solve it :-/

Contributor

xavfernandez commented Jul 21, 2016

@sigmavirus24 sorry to bother but you will certainly have a better idea of what is happening here and how we could solve it :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment