The Wire · Showcase
PYDANTIC CLOSES GAP ON DEFAULT FACTORY VALIDATION, SQLMODEL INHERITS SQLALCHEMY FIX
By RepoJournal · Filed · About FastAPI & Pydantic
Pydantic now properly validates data passed to default factories, closing a gap that forced developers to work around missing field initialization.
Pydantic fixed a validation gap where default factories weren't receiving validated data when fields were missing [1]. This surfaces a real problem: you'd write a factory expecting clean input, but get raw, unvalidated data instead, forcing downstream validation logic that shouldn't exist. The fix applies across all factory patterns and should eliminate a class of runtime bugs in production systems that rely on defaults. In related infrastructure news, SQLModel bumped SQLAlchemy to 2.0.50 [2], which fixes a joinedload issue when combined with of_type() on joined-table subclasses. This is the kind of ORM edge case that only hits you in production, so the bump is critical for anyone using those patterns. Both updates ship without breaking changes.
Action items
- → Upgrade pydantic to latest patch to fix default factory validation pydantic/pydantic [plan]
- → Update SQLAlchemy in sqlmodel projects to 2.0.50 if using joinedload with of_type tiangolo/sqlmodel [plan]
References
- [1] Handle missing errors with default factories taking validated data ↗ pydantic/pydantic
- [2] ⬆ Bump sqlalchemy from 2.0.49 to 2.0.50 ↗ tiangolo/sqlmodel
FAQ
- What changed in FastAPI & Pydantic on June 9, 2026?
- Pydantic now properly validates data passed to default factories, closing a gap that forced developers to work around missing field initialization.
- What should FastAPI & Pydantic teams do about it?
- Upgrade pydantic to latest patch to fix default factory validation • Update SQLAlchemy in sqlmodel projects to 2.0.50 if using joinedload with of_type
- Which FastAPI & Pydantic repositories shipped on June 9, 2026?
- pydantic/pydantic, tiangolo/sqlmodel