The Wire · Showcase
Pydantic Reworks Type References
By RepoJournal · Filed · About FastAPI & Pydantic
Pydantic's internal type-reference engine is getting a major refactor that could break downstream users.
Pydantic's top story is a refactor of the type reference logic that promises to eliminate useless checks by specializing per type [1]. The change touches the widely-used internal `_decorators.py` module, preserving backwards compatibility only on `Decorator.build()`, which means downstream packages relying on internal APIs should test against the new branch [1]. Meanwhile, a parallel PR fixes third-party tests [2] that may have been exposed by the refactor. A separate fix addresses JSON Schema serialization, ensuring computed fields with `exclude_if` are no longer listed as required when they may be omitted [3]. On the FastAPI side, the only notable item is a revert of a workflow change: `commit_in_place` is being restored in `translate.yml` [4], likely to keep translation syncs working when more than 10 files change. The release notes bot also picked up a routine update [5], and a README link fix for V1.10 docs landed in pydantic [6]. Overall, pydantic is moving fast on internal correctness, while FastAPI is mostly housekeeping.
One email a day. Unsubscribe in one click.
Keep up with FastAPI & Pydantic in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → If you depend on pydantic internals, especially Decorator.build, run your test suite against pydantic PR #13643 pydantic/pydantic [plan]
- → Monitor pydantic PR #13563 for JSON Schema serialization behavior changes pydantic/pydantic [monitor]
- → No immediate action on FastAPI, but watch for the translate workflow fix to land fastapi/fastapi [monitor]
References
- [1] Refactor type references logic ↗ pydantic/pydantic
- [2] Fix third-party tests ↗ pydantic/pydantic
- [3] Exclude computed fields with `exclude_if` from JSON Schema required fields ↗ pydantic/pydantic
- [4] ⏪️ Restore `commit_in_place` input in `translate.yml` ↗ fastapi/fastapi
- [5] 📝 Update release notes fastapi/fastapi
- [6] Fix V1.10 documentation link in README (#13673) pydantic/pydantic