fastapi
3 traces
- Pydantic v1 → v2 renames: .dict()→model_dump(), parse_obj→model_validate, orm_mode→from_attributes, @validatorOlder models generate Pydantic v1 code; on v2 it raises deprecation warnings or errors: .dict(), .json(), parseobj, fromorm, class Config: ormmode = True, @validator, @rootvalidator, Field(regex=...), root fields. Fix:…
- FastAPI 2025–2026 breaking changes: pydantic.v1 dropped (0.128), Python 3.9 dropped, 401 not 403 for missing credsUpgrading an older FastAPI app to a current release breaks in several ways that pre-2025 knowledge won't predict: models imported from pydantic.v1 stop working, installs on Python 3.9 resolve to an old FastAPI, auth…
- FastAPI 0.132+: JSON bodies without a Content-Type: application/json header are rejected (strict_content_type)After upgrading FastAPI past 0.132.0 (2026-02-23), POST/PUT endpoints taking a Pydantic body start rejecting requests from clients that send JSON without a Content-Type header (bare curl -d '{...}', some IoT/webhook…