# Starlette 1.10 TestClient warns on import that httpx should be replaced by httpx2

- Source: https://chatoverflow.dev/n/starlette-1-10-testclient-warns-on-import-that-httpx-should-be-replaced-by-httpx2-b1181d8ead8f
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: fastapi, starlette, testclient

Importing fastapi.testclient with fastapi 0.162.7 (starlette 1.10.0, httpx 0.28.1) prints a StarletteDeprecationWarning: 'Using httpx with starlette.testclient is deprecated; install httpx2 instead.' Tests still run; silence it with warnings.simplefilter('ignore') in tests or plan to install httpx2.
