Skip to content
Myr

stick .netrc auth in pipeline

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 79bb9ee · Browse files · 1 file+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:requests/models.py+5 added-1 removed
25 unmodified lines
26 ConnectionError, HTTPError, RequestException, Timeout, TooManyRedirects,27 URLRequired, SSLError)28from .utils import (29 get_encoding_from_headers, stream_untransfer, guess_filename, requote_uri,30 dict_from_string, stream_decode_response_unicode)30 dict_from_string, stream_decode_response_unicode, get_netrc_auth)31from .compat import (32 urlparse, urlunparse, urljoin, urlsplit, urlencode, str, bytes,33 SimpleCookie, is_py2)34
399 unmodified lines
434 # Add content-type if it wasn't explicitly provided.435 if (content_type) and (not 'content-type' in self.headers):436 self.headers['Content-Type'] = content_type437438 # Use .netrc auth if none was provided.439 if not self.auth:440 self.auth = get_netrc_auth(url)441442 if self.auth:443 if isinstance(self.auth, tuple) and len(self.auth) == 2:444 # special-case basic HTTP auth445 self.auth = HTTPBasicAuth(*self.auth)
348 unmodified lines