You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DeprecationWarning: The anyio.abc.BlockingPortal alias is deprecated, use anyio.from_thread.BlockingPortal instead. emitted from starlette/testclient.py during the offline test suite (pytest -m 'not nim_live'), once per session.
Confirmed facts (2026-09-14)
Emitter: starlette TestClient (starlette/testclient.py, _PortalFactoryType / portal annotations) via anyio ≥ 4.15, which deprecated the anyio.abc.BlockingPortal alias.
Latest starlette release on PyPI: 1.6.0 (2026-08-08), i.e. the fix is not released yet.
This repository's hash lock requirements/ci.txt pins starlette==1.3.1 and anyio==4.14.2; with anyio 4.14.x the alias is not deprecated, so CI does not currently emit the warning. A local environment resolved with a newer anyio does.
fastapi 0.141.1 (locked) allows starlette>=0.46.0, so adopting the fixed release will not require a fastapi change.
Not a code defect in this repository
No suppression, log filtering, or pin-back is applied. The warning cannot be removed here until starlette publishes the fix.
Next action / internal schedule
Adopt the first starlette release that includes #3498 by regenerating requirements/ci.txt with the documented command (pip-compile --extra=dev --generate-hashes --no-emit-index-url --output-file=requirements/ci.txt --strip-extras pyproject.toml, Python 3.11), then re-run the full offline suite with the anyio alias warning promoted to an error to prove it is gone.
Next review date: 2026-09-21 (check PyPI for a starlette release > 1.6.0). Internal target for adoption: within 7 days of that release.
Related
pytest-asyncio asyncio.get_event_loop_policy deprecation on Python 3.14 is tracked by PR test: support Python 3.14 asyncio #38 (pytest-asyncio 1.4) and is not part of this issue.
Warning
DeprecationWarning: The anyio.abc.BlockingPortal alias is deprecated, use anyio.from_thread.BlockingPortal instead.emitted fromstarlette/testclient.pyduring the offline test suite (pytest -m 'not nim_live'), once per session.Confirmed facts (2026-09-14)
TestClient(starlette/testclient.py,_PortalFactoryType/portalannotations) via anyio ≥ 4.15, which deprecated theanyio.abc.BlockingPortalalias.testclientimports the deprecatedanyio.abc.BlockingPortalalias Kludex/starlette#3497 → PR #3498 "Use anyio.from_thread.BlockingPortal in TestClient", merged 2026-09-05 on master.requirements/ci.txtpinsstarlette==1.3.1andanyio==4.14.2; with anyio 4.14.x the alias is not deprecated, so CI does not currently emit the warning. A local environment resolved with a newer anyio does.starlette>=0.46.0, so adopting the fixed release will not require a fastapi change.Not a code defect in this repository
No suppression, log filtering, or pin-back is applied. The warning cannot be removed here until starlette publishes the fix.
Next action / internal schedule
requirements/ci.txtwith the documented command (pip-compile --extra=dev --generate-hashes --no-emit-index-url --output-file=requirements/ci.txt --strip-extras pyproject.toml, Python 3.11), then re-run the full offline suite with the anyio alias warning promoted to an error to prove it is gone.Related
asyncio.get_event_loop_policydeprecation on Python 3.14 is tracked by PR test: support Python 3.14 asyncio #38 (pytest-asyncio 1.4) and is not part of this issue.