Skip to content

Commit 4b77519

Browse files
BYKclaude
andcommitted
fix: Move httpcore[asyncio] from global test deps to specific envs
The asyncio extra on httpcore pulls in anyio, which conflicts with starlette's anyio<4.0.0 pin and causes pip to downgrade httpcore to 0.18.0. That old version crashes on Python 3.14 due to typing.Union not having __module__. Keep httpcore[http2] in requirements-testing.txt (shared by all envs) and add httpcore[asyncio] only to linters, mypy, and common envs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 82c0094 commit 4b77519

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

requirements-testing.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ asttokens
1111
responses
1212
pysocks
1313
socksio
14-
httpcore[http2,asyncio]
14+
httpcore[http2]
1515
setuptools
1616
Brotli
1717
docker

tox.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,14 +327,17 @@ deps =
327327

328328
linters: -r requirements-linting.txt
329329
linters: werkzeug<2.3.0
330+
linters: httpcore[asyncio]
330331

331332
mypy: -r requirements-linting.txt
332333
mypy: werkzeug<2.3.0
334+
mypy: httpcore[asyncio]
333335
ruff: -r requirements-linting.txt
334336

335337
# === Common ===
336338
py3.8-common: hypothesis
337339
common: pytest-asyncio
340+
common: httpcore[asyncio]
338341
# See https://github.com/pytest-dev/pytest/issues/9621
339342
# and https://github.com/pytest-dev/pytest-forked/issues/67
340343
# for justification of the upper bound on pytest

0 commit comments

Comments
 (0)