Merge pull request #3293 from thecaptain789/fix-httpx-proxy-arg

fix(fetch): update to httpx 0.28+ proxy parameter
This commit is contained in:
Ola Hungerford
2026-03-07 12:38:04 -07:00
committed by GitHub
3 changed files with 4 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
]
dependencies = [
"httpx<0.28",
"httpx>=0.27",
"markdownify>=0.13.1",
"mcp>=1.1.3",
"protego>=0.3.1",

View File

@@ -72,7 +72,7 @@ async def check_may_autonomously_fetch_url(url: str, user_agent: str, proxy_url:
robot_txt_url = get_robots_txt_url(url)
async with AsyncClient(proxies=proxy_url) as client:
async with AsyncClient(proxy=proxy_url) as client:
try:
response = await client.get(
robot_txt_url,
@@ -116,7 +116,7 @@ async def fetch_url(
"""
from httpx import AsyncClient, HTTPError
async with AsyncClient(proxies=proxy_url) as client:
async with AsyncClient(proxy=proxy_url) as client:
try:
response = await client.get(
url,

View File

@@ -323,4 +323,4 @@ class TestFetchUrl:
)
# Verify AsyncClient was called with proxy
mock_client_class.assert_called_once_with(proxies="http://proxy.example.com:8080")
mock_client_class.assert_called_once_with(proxy="http://proxy.example.com:8080")