From e8b9a12316f30836598b9a14623ef7cf8e649eb9 Mon Sep 17 00:00:00 2001 From: xic Date: Fri, 4 Sep 2026 14:50:46 +0800 Subject: [PATCH] refactor: migrate httpx to httpx2 with dual import Refs: HTTPXodus campaign --- pyproject.toml | 1 + tests/test_aws_client_unit.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dc71b35c7..1ba025d6a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,7 @@ python = "^3.10" aiohttp = { version = ">=3.14.1,<4", optional = true, python = ">=3.10"} fastavro = "^1.9.4" httpx = ">=0.25.0" +httpx2 = { version = "^2.12", python = "^3.10" } httpx-aiohttp = { version = "^0.1.8", optional = true, python = ">=3.10"} oci = { version = "^2.165.0", optional = true} pydantic = ">= 1.9.2" diff --git a/tests/test_aws_client_unit.py b/tests/test_aws_client_unit.py index 94e584922..0552174e6 100644 --- a/tests/test_aws_client_unit.py +++ b/tests/test_aws_client_unit.py @@ -13,7 +13,10 @@ import unittest from unittest.mock import MagicMock, patch -import httpx +try: + import httpx2 as httpx +except ImportError: + import httpx from cohere.manually_maintained.cohere_aws.mode import Mode