fix(fetch): update to httpx 0.28+ proxy parameter

The httpx library renamed 'proxies' to 'proxy' in version 0.28.0.
This updates the fetch server to use the new parameter name and
removes the version cap on httpx.

Fixes #3287
This commit is contained in:
thecaptain789
2026-02-06 15:25:43 +00:00
parent 10d382798e
commit 8614dff06f
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")