Update dependencies to use httpx2 and refactor tests for compatibility

This commit is contained in:
k1nq
2026-09-16 13:49:46 +05:00
parent 7d0762ef17
commit 01028f440e
4 changed files with 79 additions and 61 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import random
from collections.abc import Awaitable, Callable
from datetime import UTC, datetime
import httpx
import httpx2
from sqlalchemy import select
from sqlalchemy.ext.asyncio import async_sessionmaker
@@ -37,7 +37,7 @@ class WebhookClient:
self._timeout = timeout
async def send(self, url: str, payload: PaymentWebhook) -> None:
async with httpx.AsyncClient(timeout=self._timeout) as client:
async with httpx2.AsyncClient(timeout=self._timeout) as client:
response = await client.post(url, json=payload.model_dump(mode="json"))
response.raise_for_status()