RepoJournal

$ cat fastapi/week/2026-11-02.log

FastAPI & Pydantic

FastAPI & Pydantic

the week in review · Nov 2 – Nov 8, 2026

Pydantic drops Python 3.10, then layers serialization fast paths

By RepoJournal · composed from the cited sources · human-reviewed weekly · methodology

♥

Wednesday's 3.10 removal is the week's one breaking change; the rest of the period is serialization and schema-generation speedup work.

99 commits 78 PRs merged 3 releases 7 briefings covered

all fastapi reviews →

Improve performance of model serialization pydantic/pydantic

by Viicos

Three changes to the fields serializer used by models, dataclasses and TypedDicts, pulled from maxisbey/pydantic#16: no second __dict__ lookup for models serialized outside unions, and fewer dict-path checks. This is throughput on the hot path every response and cache write traverses.

Improve performance of dict serialization pydantic/pydantic

by Viicos

Stacked on the fields serializer work, this skips the include/exclude filter logic, and the key hashing that goes with it, when there is nothing to filter by. Models and dicts serialized without field filters stop paying for a decision that always resolves the same way.

Improve performance of type inference during serialization pydantic/pydantic

by Viicos

For values whose type is inferred during serialization (Any, dict[str, Any]), the recursion guard is dropped for None, bool, int and str, which cannot be part of a reference cycle. Loose-typed payloads, the ones most code defaults to at boundaries, get the benefit.

Improve schema generation for fixed type handlers pydantic/pydantic

by alexmojaki

Fixed no-argument core schemas for builtin scalars, object, date/time types, Decimal, UUID, Url, Fraction, MultiHostUrl and the sentinels now build once and return a shallow copy. Schema construction for plain field types gets cheaper on every model definition.

Skip general schema dispatch for builtin scalars pydantic/pydantic

by alexmojaki

Builds on that, skipping origin lookup, hook inspection and general dispatch for exact immutable types in generate_schema() and the annotation inner handler. Custom hooks still work; scalar fields just stop paying the dispatch tax first.

Fix `ByteSize.human_readable()` showing `1024.0KiB` instead of `1.0MiB` just below a unit boundary pydantic/pydantic

by Viicos

human_readable() returned 1024.0KiB for values just under a unit boundary instead of 1.0MiB. Cosmetic unless byte sizes reach logs or metrics, where the off-by-scale string is the thing humans read.

Fix JSON Schema for `arguments` schema pydantic/pydantic

by Viicos

Corrects the generated JSON Schema for arguments, tracked in issue #13938. If you publish tool or function schemas built from Pydantic models, regenerate them: the old output was wrong, not merely different.

Benchmark `TypedDict` schema generation across builds pydantic/pydantic

by alexmojaki

Alongside: a CodSpeed benchmark for two independently built child TypedDicts sharing a leaf type, benchmarks for serializing large strings to JSON, a Ruff bump to 0.17.3, entry points API in the plugin loader, and FastAPI bumping pillow to 13.0.0 and dnspython to 2.9.2.

$ ls fastapi/week/ # the briefings behind this review

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.

all fastapi reviews →