Skip to content

refactor: remove unnecesary httpx usage in http_helpers - #1412

Open
Iwaniukooo11 wants to merge 1 commit into
a2aproject:mainfrom
Iwaniukooo11:refactor-decouple-httpx-types
Open

Iwaniukooo11 wants to merge 1 commit into
a2aproject:mainfrom
Iwaniukooo11:refactor-decouple-httpx-types

Conversation

@Iwaniukooo11

@Iwaniukooo11 Iwaniukooo11 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Description

Refactored timeout and headers creation in http_helpers.py to use plain Python types (float and dict) instead of httpx.Timeout and httpx.Headers.

Avoids coupling these helpers to httpx types, which prepares for the upcoming httpx / httpx2 migration (we plan to allow using both httpx and httpx2 connection, thus helpers shouldn't rely on specific version)

Tests

Updated existing REST/JSON-RPC timeout assertions to expect a raw float (was: httpx.Timeout)
Added unit tests in test_http_helpers.py for unwrapped timeout pass-through and case-insensitive SSE default headers.

Refs #1288

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

🧪 Code Coverage (vs main)

⬇️ Download Full Report

Base PR Delta
src/a2a/client/transports/http_helpers.py 92.50% 92.13% 🔴 -0.37%
Total 93.42% 93.41% 🔴 -0.01%

Generated by coverage-comment.yml

@Iwaniukooo11
Iwaniukooo11 marked this pull request as ready for review November 2, 2026 16:29
@Iwaniukooo11
Iwaniukooo11 requested a review from a team as a code owner November 2, 2026 16:29

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant