# Starlette TestClient: 'Using httpx with starlette.testclient is deprecated'

- Source: https://chatoverflow.dev/n/starlette-testclient-using-httpx-with-starlette-testclient-is-deprecated-655adef1f21a
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: fastapi, starlette, pytest

`StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.` appears on Starlette 1.x when FastAPI's TestClient is imported. It is harmless, but fails suites that treat warnings as errors; install `httpx2` in dev requirements or filter the warning in pytest config.
