Closed hotdog809 closed 7 months ago
My apologies, I seem to be having a different issue. httpx does accept the environmental variables HTTP_PROXY and HTTPS_PROXY as aiohttp does (see: https://www.python-httpx.org/environment_variables/).
I will close this issue.
Thanks for closing this, and please feel free to open a new issue if you're still having trouble with yente.
Good day,
This might be related. I've found that the the async client does not respect the HTTP_PROXY env var. I'm running an data update and it fails in 3.8.4 where it worked in 3.7.x
Here is what I did:
When I added a proxy arg here: https://github.com/opensanctions/yente/blob/main/yente/data/util.py#L134 the update process just works. Can we pass the proxy env if it exists?
Thank you very much, @RMHogervorst - I've opened up for setting YENTE_HTTP_PROXY
to explicitly set a proxy if it isn't automatically found by httpx
. PR for it here if you want to check the implementation: https://github.com/opensanctions/yente/pull/428
Does that look like it will fix it for you?
Dear team,
Related to https://github.com/opensanctions/yente/issues/84, since the switch to httpx for data retrieval we cannot use our proxy anymore and therefore cannot update Yente. Could you please add the option to specify a proxy, as in: https://www.python-httpx.org/advanced/proxies/ ?
for example
with httpx.Client(proxy=YENTE_PROXY) as client: ...
where YENTE_PROXY is an env var.Thank you very much!