RepoJournal
FastAPI & Pydantic FastAPI & Pydantic
140 wires and counting

$ follow FastAPI & Pydantic

Keep up with FastAPI & Pydantic in about 3 minutes: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

fair warning: these emails are deeply technical. diffs, version numbers, CVEs, benchmark deltas. if that's not your idea of a good read, this isn't your newsletter.

Folds into your digest — weekly by default, monthly if you prefer. Unsubscribe in one click.

$ status

wire 2026-05-17
stories 12

© 2026 RepoJournal Home Showcase How it works Privacy

$ the-wire · showcase

PYDANTIC FIXES DEEPCOPY CRASH IN MODEL_COPY

By RepoJournal · Filed · About FastAPI & Pydantic · Composed from the cited sources · methodology

Pydantic's `model_copy(deep=True)` no longer tries to deepcopy fields you're about to replace, fixing crashes when those fields hold undeepcopyable objects like GPU tensors or C extensions.

The fix [1] is surgical and high-impact. Before, `model_copy(deep=True, update={...})` would deepcopy every field including ones you're immediately replacing, which breaks when those fields contain native C extensions, file handles, or GPU tensors. Now it only deepcopies fields that survive the update, and it properly maintains shared references between fields by using a single `memo` dict across all deepcopy calls. This preserves the behavior for `__pydantic_extra__` and `__pydantic_private__` as well. In parallel, the Pydantic team fixed a mypy plugin regression [2] where `create_model(..., __base__=cls)` inside a classmethod would lose the `Self` type. The mypy plugin now falls back to the normal overload definition when `__base__` is a type variable, keeping proper generic inference. Expect these in the next release.

Quick answers

What shipped in FastAPI & Pydantic on May 17, 2026?
Pydantic's `model_copy(deep=True)` no longer tries to deepcopy fields you're about to replace, fixing crashes when those fields hold undeepcopyable objects like GPU tensors or C extensions. In total, 6 commits and 6 pull requests landed.
Who contributed to FastAPI & Pydantic on May 17, 2026?
2 developers shipped this update, including connorcarpenter15 and cyphercodes.
What were the notable FastAPI & Pydantic updates?
Only deepcopy non-updated fields in `model_copy()` and Fallback to `create_model()` overload definition when `__base__` is set to a type variable.