Skip to content

Commit e86dbce

Browse files
authored
fix: add upper bound of HTTPX version (#347)
- HTTPX 0.27 supports both the `proxies` and `proxy` args, while version 0.28 supports only the `proxy`. - I am adopting the updated arg name to align with the newer version. - However, we cannot fully upgrade to 0.28 as there are more issues.
1 parent 9156b07 commit e86dbce

File tree

6 files changed

+417
-95
lines changed

6 files changed

+417
-95
lines changed

docs/02-guides/01-requests-and-httpx.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async def main():
9292
async with Actor:
9393
proxy_configuration = await Actor.create_proxy_configuration()
9494
proxy_url = await proxy_configuration.new_url()
95-
async with httpx.AsyncClient(proxies=proxy_url) as httpx_client:
95+
async with httpx.AsyncClient(proxy=proxy_url) as httpx_client:
9696
response = httpx_client.get(f'http://example.com'),
9797
print(response)
9898
```

docs/03-concepts/05-proxy-management.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ use the [`proxies` argument](https://www.python-httpx.org/advanced/#http-proxyin
185185
proxy_configuration = await Actor.create_proxy_configuration()
186186
proxy_url = await proxy_configuration.new_url()
187187

188-
response = httpx.get('http://example.com', proxies=proxy_url)
188+
response = httpx.get('http://example.com', proxy=proxy_url)
189189
# --- OR ---
190-
async with httpx.AsyncClient(proxies=proxy_url) as httpx_client:
190+
async with httpx.AsyncClient(proxy=proxy_url) as httpx_client:
191191
response = await httpx_client.get('http://example.com')
192192
```
193193

0 commit comments

Comments
 (0)