Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions httpx/_client.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -80,7 +80,7 @@ def __init__(
self.timeout = Timeout(timeout)
self.max_redirects = max_redirects
self.trust_env = trust_env
self.netrc = NetRCInfo()
self._netrc = NetRCInfo()

def _get_proxy_map(
self, proxies: typing.Optional[ProxiesTypes], trust_env: bool,
Expand DownExpand Up@@ -269,7 +269,7 @@ def _build_auth(self, request: Request, auth: AuthTypes = None) -> Auth:
return BasicAuth(username=username, password=password)

if self.trust_env and "Authorization" not in request.headers:
credentials = self.netrc.get_credentials(request.url.authority)
credentials = self._netrc.get_credentials(request.url.authority)
if credentials is not None:
return BasicAuth(username=credentials[0], password=credentials[1])

Expand Down