From: Florimond Manca Date: Sat, 1 Aug 2020 10:04:38 +0000 (+0200) Subject: Client.trust_env becomes read-only (#1112) X-Git-Tag: 0.14.0~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a110072bba28a4ae3b4995b23673b66b61539cc1;p=thirdparty%2Fhttpx.git Client.trust_env becomes read-only (#1112) --- diff --git a/httpx/_client.py b/httpx/_client.py index c11b466c..5a32f84e 100644 --- a/httpx/_client.py +++ b/httpx/_client.py @@ -81,9 +81,13 @@ class BaseClient: self._cookies = Cookies(cookies) self.timeout = Timeout(timeout) self.max_redirects = max_redirects - self.trust_env = trust_env + self._trust_env = trust_env self._netrc = NetRCInfo() + @property + def trust_env(self) -> bool: + return self._trust_env + def _get_proxy_map( self, proxies: typing.Optional[ProxiesTypes], trust_env: bool, ) -> typing.Dict[str, typing.Optional[Proxy]]: