The Wire · Showcase
Pydantic opens serialization to any core schema
By RepoJournal · Filed · About FastAPI & Pydantic
Pydantic's latest PR lets any CoreSchema act as a serializer, closing a long-standing gap between validators and serializer function schemas.
Pydantic's "Allow any CoreSchema to be used as serialization" [1] unblocks a class of schemas that previously couldn't be serialized because the as_ser_schema() helper assumed the input wasn't a serializer function schema. The same contributor, Viicos, also shipped a performance pass on GenerateSchema.generate_schema() dispatching [2], doing a single get_origin() call early to decide whether to look for __get_pydantic_core_schema__(), which lands meaningful savings on hot paths. Two small housekeeping PRs round out the desk: a Unix timestamp typo fix [3] and its merge commit [4] correct the spelling of "since" in docs. Over on FastAPI, the action is translation automation and release notes: a ko translation update [5] comes with a note that PRs to the llm-prompt.md file are preferred for better LLM-generated translations, and branch updates [6] and release notes refreshes [7][8] keep the repo humming. All quiet on breaking changes. Ship with confidence.
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
- → Review pydantic PR 13680 and test serialization cases that previously failed pydantic/pydantic [plan]
- → Benchmark schema generation after PR 13614 to confirm performance gains pydantic/pydantic [monitor]
- → Check the ko translation flow and consider updating llm-prompt.md for better translations fastapi/fastapi [monitor]
References
- [1] Allow any `CoreSchema` to be used as serialization ↗ pydantic/pydantic
- [2] Improve performance of `GenerateSchema.generate_schema()` dispatching ↗ pydantic/pydantic
- [3] Fix Unix timestamp typo ↗ pydantic/pydantic
- [4] Fix Unix timestamp typo (#13679) pydantic/pydantic
- [5] 🌐 Update translations for ko (update-outdated) ↗ fastapi/fastapi
- [6] 👷 Update translation PR branches with PR Push ↗ fastapi/fastapi
- [7] 📝 Update release notes fastapi/fastapi
- [8] 📝 Update release notes fastapi/fastapi