Skip to content
Myr

client.netrc should be private (#1071)

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

authored by Tom Christie · committed by GitHub · parent 8ed7e52 · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:httpx/_client.py+2 added-2 removed
78 unmodified lines
79 self._cookies = Cookies(cookies)80 self.timeout = Timeout(timeout)81 self.max_redirects = max_redirects82 self.trust_env = trust_env83 self.netrc = NetRCInfo()83 self._netrc = NetRCInfo()8485 def _get_proxy_map(86 self, proxies: typing.Optional[ProxiesTypes], trust_env: bool,87 ) -> typing.Dict[str, Proxy]:
180 unmodified lines
268 if username or password:269 return BasicAuth(username=username, password=password)270271 if self.trust_env and "Authorization" not in request.headers:272 credentials = self.netrc.get_credentials(request.url.authority)272 credentials = self._netrc.get_credentials(request.url.authority)273 if credentials is not None:274 return BasicAuth(username=credentials[0], password=credentials[1])275276 return Auth()
1243 unmodified lines