$ the-wire ยท showcase
FastAPI 0.150.0 treats empty file inputs as missing
By RepoJournal ยท Filed ยท About FastAPI & Pydantic ยท Composed from the cited sources ยท methodology
FastAPI 0.150.0 changes how unselected file inputs are validated, while Pydantic lands recursion guards and a mypy plugin fix.
0.150.0 fastapi/fastapi
by github-actions[bot]
When no file is selected, browsers submit a file part with an empty filename and empty content. FastAPI now treats that as missing, so required file fields return a validation error while fields with defaults or default factories use them; named zero-byte files are still accepted and unselected inputs are ignored inside lists of files. This is a breaking change for endpoints that previously rec...
๐ Treat unselected browser file inputs as missing fastapi/fastapi
The change came from tiangolo directly, reviewed from an AI-assisted patch that the PR notes was made with Codex using gpt-6-astra.
Implement recursion guard for `validate_strings()` (#14029) pydantic/pydantic
validate_strings() gets a recursion guard. The commit implements the guard merged from the earlier proposal, closing off recursive validation through string input.
Fix mypy plugin crash on deferred empty model (#14027) pydantic/pydantic
Ivan Levkivskyi fixed a crash in the mypy plugin when handling a deferred empty model.
Fix infinite recursion when validating an invalid default with `PydanticUseDefault` pydantic/pydantic
Still in review: a fix for infinite recursion when validating an invalid default with PydanticUseDefault, alongside an updated Emscripten online preview.
Action items