From 5015946ab5feee1ce22c178e7cd989ed8a2a80e7 Mon Sep 17 00:00:00 2001 From: Louis King Date: Sun, 14 Jun 2026 18:34:51 +0100 Subject: [PATCH] fix(deps): pin fastapi below 0.137.0 to fix CI route introspection FastAPI 0.137.0 regressed include_router: endpoints registered via app.include_router no longer appear in app.routes (they still serve, but introspection breaks). tests/test_api/test_app_factory.py asserts on app.routes, so CI (which pip-installs the latest fastapi) failed on the /metrics route check while local pinned 0.136.3 passed. Constrain fastapi to <0.137.0 until a fixed release is available. Co-Authored-By: Claude Opus 4.8 --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 687aa2f..914bfbf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,10 @@ dependencies = [ "python-dotenv>=1.0.0", "sqlalchemy>=2.0.0", "alembic>=1.12.0", - "fastapi>=0.100.0", + # 0.137.0 regressed include_router: routed endpoints no longer appear in + # app.routes (they still serve, but introspection breaks). Pin below it + # until a fixed release lands. See test_app_factory metrics route checks. + "fastapi>=0.100.0,<0.137.0", "starlette>=0.40.0,<1.0.0", "uvicorn[standard]>=0.23.0", "paho-mqtt>=2.0.0",