pydantic
pydantic
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix: propagate __slots__ to generic parameterizations (#13215)
mjsirfan2015:fix/slots-propagation-issue-13215
10 hours ago
fix: sort union args to put subclasses first for correct serialization When a union contains both a parent class and its subclass (e.g. Parent | Child), pydantic-core's union serializer uses the first matching schema. Since isinstance(child_instance, Parent) is True, the Parent schema was incorrectly selected first, causing the child's extra fields to be dropped during serialization. The bug was most visible when the parent model had a field with a default whose type was not an exact match for the field annotation (e.g. a=float=0 where the default is an int). In that case pydantic-core would match the Parent schema for a Child instance and serialize only the Parent fields. Fix: add a stable sort in _union_schema so that subclasses come before their parent classes. Only types that are strict subclasses of other union members are moved; unrelated types preserve their original relative order. Fixes #12099
GayathriSrividya:fix/issue-12099-union-subclass-serialization
1 day ago
Support AliasPath root list indices
ManuDiasCruz:v2-mcg-task001-ap
2 days ago
Merge branch 'main' into fix-nameemail-period-display-name
SahilNambiar11:fix-nameemail-period-display-name
2 days ago
Update documentation links
vp/update-docs-links
2 days ago
Update documentation links
vp/update-docs-links
2 days ago
Fix Coverage badge link target on docs landing page (#13227)
main
2 days ago
Fix Coverage badge link target on docs landing page
Christian-Katzmann:patch-2
5 days ago
Latest Branches
CodSpeed Performance Gauge
0%
fix: propagate __slots__ to generic parameterizations (#13215)
#13233
10 hours ago
d9f5fb2
mjsirfan2015:fix/slots-propagation-issue-13215
CodSpeed Performance Gauge
-3%
fix: sort union members so subclasses are tried first during serialization
#13231
1 day ago
ddec733
GayathriSrividya:fix/issue-12099-union-subclass-serialization
CodSpeed Performance Gauge
0%
Support AliasPath root list indices
#13230
2 days ago
6220c5b
ManuDiasCruz:v2-mcg-task001-ap
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs