httpx
httpx copied to clipboard
Cleanup `trust_env` as property of Client.
Summary
No need to have trust_env as property since it only used on initialization. I added new test for trust_env behavior.
Is there any reason someone would want to check if the client has this option set?
I didn't find any usecase/usage of it anywhere, btw anyone can use custom client to have it again:
class CustomClient(httpx.Client):
def __init__(self, *, **kwargs) -> None:
super().__init__(**kwargs)
self._trust_env = kwargs.get("trust_env", True)
@property
def trust_env(self) -> bool:
return self._trust_env