Cap fastapi below 0.151
Caps FastAPI below 0.151 in pyproject.toml and client/pyproject.toml, and locks it to 0.150.0.
FastAPI 0.151.0 (fastapi/fastapi#16536) validates an explicit JSON null against a body parameter instead of using the parameter's default. The client sends null for unset sort, limit and filters, so on 0.151 and later about 144 body parameters across 55 server endpoints return 422: most /filter, /count, /paginate and /history routes, which break read_flow_runs, prefect deploy, worker heartbeats and artifact and log reads. A fresh install currently resolves FastAPI 0.155, so it hits this. The cap comes off once the server treats null as the default again; that work is tracked separately.
Two smaller changes between 0.141 and 0.150 also needed fixes:
- 0.145 removed
FastAPI.extra, which browserprefect cloud loginused to pass state between the login server and the CLI. It now uses the app'sstate. - 0.148 stopped validating omitted query defaults, so the flow-run graph's
sincedefault reached the handler as a string. The default is now the datetime itself.
The existing cloud-login and flow-run-graph tests fail on 0.150 without these fixes and pass with them. The server, client, runner, worker and CLI suites pass on 0.150.0 (4,233 passed).
Checklist
- This pull request references any related issue by including "closes
<link to issue>"- The issue for lifting the cap is tracked internally.
- If this pull request adds or changes functionality, it includes tests or explains why tests are not needed.
- Existing tests cover both fixes.
- If this pull request changes user-facing behavior, it updates documentation or explains why documentation is not needed.
- Only the supported FastAPI range changes.
- If this pull request removes docs files, it includes redirect settings in
mint.json.- No docs files removed.
- If this pull request adds functions or classes, it includes helpful docstrings.