Skip to content

Commit 99633f4

Browse files
baywetCopilot
andcommitted
fix(declarative): validate supported HTTPX versions
Co-authored-by: Copilot <[email protected]> Copilot-Session: 9015c274-1215-4163-94db-643befd21f8d
1 parent 6665733 commit 99633f4

5 files changed

Lines changed: 37 additions & 2 deletions

File tree

‎.github/workflows/python-code-quality.yml‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,32 @@ jobs:
141141
UV_CACHE_DIR: /tmp/.uv-cache
142142
- name: Run tests/samples type checkers (mypy, pyrefly, ty)
143143
run: uv run --locked --group tool-runtime python -m scripts.workspace_poe_tasks ci-test-typing
144+
145+
declarative-httpx-compatibility:
146+
name: Declarative HTTPX Compatibility (${{ matrix.httpx-version }})
147+
strategy:
148+
fail-fast: false
149+
matrix:
150+
httpx-version: ["0.27.0", "0.28.1"]
151+
runs-on: ubuntu-latest
152+
defaults:
153+
run:
154+
working-directory: ./python
155+
steps:
156+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
157+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
158+
with:
159+
version-file: "python/pyproject.toml"
160+
- name: Install isolated declarative test environment
161+
run: |
162+
uv venv .venv-httpx --python 3.11
163+
uv pip install --python .venv-httpx/bin/python \
164+
-e packages/core -e packages/declarative \
165+
"httpx==${{ matrix.httpx-version }}" \
166+
pytest==9.1.1 pytest-asyncio==1.4.0 pytest-timeout==2.4.0
167+
uv pip check --python .venv-httpx/bin/python
168+
- name: Test bounded HTTP handling
169+
run: |
170+
.venv-httpx/bin/python -m pytest \
171+
packages/declarative/tests/test_default_http_request_handler.py \
172+
-m "not integration" -q -o addopts=''

‎python/packages/declarative/AGENTS.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Both state classes validate object attribute names but leave dictionary keys unc
1818
wire and decoded-stage body limit, including redirect and authentication responses.
1919
It supports identity, gzip, and deflate, rejects unsupported or incomplete encodings,
2020
and closes response streams without closing caller-owned clients.
21+
HTTPX is constrained to the 0.27 and 0.28 series; focused CI checks both
22+
series because response caching and default-header integration use its internals.
2123

2224
## MCP Handler Lifetimes
2325

‎python/packages/declarative/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ HTTPX's generated default are preserved but do not enable additional decoders.
6161
Caller-supplied response hooks and transports must not
6262
buffer response bodies before the handler applies its limit.
6363

64+
HTTPX support is limited to the 0.27 and 0.28 series because the bounded
65+
intermediate-response cache and generated default-header integration depend
66+
on HTTPX internals. Compatibility tests cover HTTPX 0.27.0 and 0.28.1.
67+
6468
## MCP handler session lifetime
6569

6670
`DefaultMCPToolHandler()` reuses MCP sessions through a bounded LRU cache.

‎python/packages/declarative/pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ classifiers = [
2323
]
2424
dependencies = [
2525
"agent-framework-core>=1.20.0,<2",
26-
"httpx>=0.27,<1",
26+
"httpx>=0.27,<0.29",
2727
"powerfx>=0.0.32,<0.0.35; python_version < '3.14'",
2828
"pyyaml>=6.0,<7.0",
2929
]

‎python/uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)