v2.12.0 2025-10-07
v2.12.0 (2025-10-07)
[!NOTE] Check out the blog post for release highlights. Several minor changes (considered non-breaking changes according to our versioning policy) are also included in this release. Make sure to look into them before upgrading.
[!WARNING] The core functionality of Pydantic V1 is not compatible with Python 3.14 or greater. This was fixed in v1.10.26.
This is the final 2.12 release. It features the work of 20 external contributors and provides useful new features, along with initial Python 3.14 support.
Changelog (see the 2.12.0a1 and 2.12.0b1 releases for additional changes since 2.11):
Packaging
- Update V1 copy to v1.10.24 by @Viicos in #12338
New Features
- Add
extraparameter to the validate functions by @anvilpete in #12233 - Add
exclude_computed_fieldsserialization option by @Viicos in #12334 - Add
preverse_empty_pathURL options by @Viicos in #12336 - Add
union_formatparameter to JSON Schema generation by @Viicos in #12147 - Add
__qualname__parameter forcreate_modelby @Atry in #12001
Fixes
- Do not try to infer name from lambda definitions in pipelines API by @Viicos in #12289
- Use proper namespace for functions in
TypeAdapterby @Viicos in #12324 - Use
Anyfor context type annotation inTypeAdapterby @inducer in #12279 - Expose
FieldInfoinpydantic.fields.__all__by @Viicos in #12339 - Respect
validation_aliasin@validate_callby @Viicos in #12340 - Use
Anyas context annotation in plugin API by @Viicos in #12341 - Use proper
stacklevelin warnings when possible by @Viicos in #12342
New Contributors
- @anvilpete made their first contribution in #12233
- @JonathanWindell made their first contribution in #12327
- @inducer made their first contribution in #12279
- @Atry made their first contribution in #12001
Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.10...v2.12.0