The Wire · Showcase
PYDANTIC FIXES DEFAULT FACTORY VALIDATION BUG, SQLALCHEMY PATCHES ORM ISSUE
By RepoJournal · Filed · About FastAPI & Pydantic
Pydantic shipped a fix for a validation edge case where default factories weren't receiving validated data, solving a real-world pattern that's been breaking in production.
Pydantic's default factory handling [1] now correctly passes validated field data to factories that need it, closing the loop on issue #13266 where validation context was getting lost. This is the kind of fix that looks small in the PR but catches developers who've been working around it with manual validation logic. SQLAlchemy 2.0.50 landed in SQLModel [2] with an ORM fix for joinedload combined with of_type() on joined-table subclasses, addressing a relatively narrow but high-impact case for polymorphic queries. If you're using either pattern, the chain stops breaking today.
Action items
- → Upgrade pydantic to the latest patch - default factory validation is now correct pydantic/pydantic [plan]
- → Update SQLAlchemy to 2.0.50 via SQLModel if you use polymorphic joinedloads 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 8, 2026?
- Pydantic shipped a fix for a validation edge case where default factories weren't receiving validated data, solving a real-world pattern that's been breaking in production.
- What should FastAPI & Pydantic teams do about it?
- Upgrade pydantic to the latest patch - default factory validation is now correct • Update SQLAlchemy to 2.0.50 via SQLModel if you use polymorphic joinedloads
- Which FastAPI & Pydantic repositories shipped on June 8, 2026?
- pydantic/pydantic, tiangolo/sqlmodel