Skip to content

Commit a97aba1

Browse files
authored
Merge pull request #3293 from thecaptain789/fix-httpx-proxy-arg
fix(fetch): update to httpx 0.28+ proxy parameter
2 parents ad3e660 + 8614dff commit a97aba1

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/fetch/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ classifiers = [
1616
"Programming Language :: Python :: 3.10",
1717
]
1818
dependencies = [
19-
"httpx<0.28",
19+
"httpx>=0.27",
2020
"markdownify>=0.13.1",
2121
"mcp>=1.1.3",
2222
"protego>=0.3.1",

src/fetch/src/mcp_server_fetch/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ async def check_may_autonomously_fetch_url(url: str, user_agent: str, proxy_url:
7272

7373
robot_txt_url = get_robots_txt_url(url)
7474

75-
async with AsyncClient(proxies=proxy_url) as client:
75+
async with AsyncClient(proxy=proxy_url) as client:
7676
try:
7777
response = await client.get(
7878
robot_txt_url,
@@ -116,7 +116,7 @@ async def fetch_url(
116116
"""
117117
from httpx import AsyncClient, HTTPError
118118

119-
async with AsyncClient(proxies=proxy_url) as client:
119+
async with AsyncClient(proxy=proxy_url) as client:
120120
try:
121121
response = await client.get(
122122
url,

src/fetch/tests/test_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,4 +323,4 @@ async def test_fetch_with_proxy(self):
323323
)
324324

325325
# Verify AsyncClient was called with proxy
326-
mock_client_class.assert_called_once_with(proxies="http://proxy.example.com:8080")
326+
mock_client_class.assert_called_once_with(proxy="http://proxy.example.com:8080")

0 commit comments

Comments
 (0)