Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Production never switches to httpx2

High Severity

httpx2 is added as a required dependency, but production still imports httpx and builds httpx.Client in the core client, AWS/OCI transports, and SSE helpers. The dual-import lives only in a unit test, so the SDK never runs on httpx2 and every installer now pulls an unused package.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e8b9a12. Configure here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lockfile omits new httpx2 dependency

Medium Severity

httpx2 was added to pyproject.toml without updating poetry.lock. poetry install follows the stale lock and will not install httpx2, so CI keeps using the httpx fallback. Poetry 2.x, which generated this lockfile, also errors when the content-hash no longer matches.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e8b9a12. Configure here.

httpx-aiohttp = { version = "^0.1.8", optional = true, python = ">=3.10"}
oci = { version = "^2.165.0", optional = true}
pydantic = ">= 1.9.2"
Expand Down
5 changes: 4 additions & 1 deletion tests/test_aws_client_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down