RepoJournal
FastAPI & Pydantic

FastAPI & Pydantic

FastAPI and the Pydantic + SQLModel async-Python stack

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.

Pick a date

Topics: Python Full archive →

The Wire · Showcase

PYDANTIC FIXES GENERIC CLASS SLOT POPULATION BUG

By RepoJournal · Filed · About FastAPI & Pydantic

Pydantic patched a critical issue where `__slots__` weren't properly inherited from generic parent classes during type parameterization, breaking memory-efficient model subclasses.

The fix [1] resolves issue #13215, which exposed a gap in how Pydantic handles slot inheritance when you parameterize a generic model. If you've built memory-conscious applications using generic base classes with `__slots__`, this patch closes the hole that forced extra memory overhead on every instance. The change is surgical: Pydantic now correctly populates `__slots__` from the generic class during parameterization, ensuring that subclasses maintain the memory profile you designed for. This matters most for large-scale deployments running thousands of model instances, where the overhead compounds fast. Expect this in the next release.

One email a day. Unsubscribe in one click.

Action items

References

  1. [1] Populate `__slots__` from generic class during parameterization (#13243) pydantic/pydantic

Quick answers

What shipped in FastAPI & Pydantic on May 30, 2026?
Pydantic patched a critical issue where `__slots__` weren't properly inherited from generic parent classes during type parameterization, breaking memory-efficient model subclasses. In total, 1 commits and 1 pull requests landed.
What were the notable FastAPI & Pydantic updates?
Populate `__slots__` from generic class during parameterization (#13243).

More from FastAPI & Pydantic

Daily updates, in your inbox

Follow FastAPI & Pydantic

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

or

One email a day. Unsubscribe in one click. Read a past issue →

Elsewhere on the wire

Want every project, not just this one?