pypi pydantic 2.14.0
v2.14.0 2026-10-08

latest releases: 2.14.4, 2.14.3, 2.14.2...
one month ago

What's Changed

The highlights of the v2.14 release are available in the blog post.
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.

This release drops support for Python 3.9 and adds support for Python 3.15.

Two security fixes are fixed by this release: GHSA-gj4f-r7mf-jjxh and GHSA-955g-x97g-8mcp.

New Features

  • Add support for multiple_of constraint in fraction and timedelta core schemas by @Viicos in #13873
  • Add __namespace__ parameter to create_model() by @Viicos in #13895

Changes

Fixes

  • Reject large exponents in Fraction validation by @Viicos in #13944. Addresses GHSA-gj4f-r7mf-jjxh.
  • Avoid validating URL prefix multiple times in multi host URLs by @Viicos in #13945. Addresses GHSA-955g-x97g-8mcp.
  • Call enum constructors in both validation modes by @Viicos in #13792
  • Fix documentation examples not raising and remove unused string_sub_type unused error code by @Viicos in #13821
  • Catch OverflowError during ByteSize validation by @Viicos in #13850
  • Require multiple_of constraints to be positive by @Viicos in #13862
  • Always pop field name and model type stacks during schema generation by @saquibjawedbit in #13859
  • Handle TypeError gracefully during docstring extraction by @Viicos in #13874
  • Fix config propagation of stdlib dataclasses and TypedDicts in JSON Schema by @Viicos in #13891
  • Don't apply ser_json_timedelta to all datetime types in serialization inference by @Viicos in #13892
  • Encode JSON Schema defaults with a consistent configuration by @Viicos in #13893
  • Propagate init and kw_only=False from Field() to stdlib dataclass fields by @Viicos in #13898
  • Respect propagated extra config in the JSON Schema of stdlib dataclasses by @Viicos in #13899
  • Handle OS errors during ZoneInfo validation by @Viicos in #13912
  • Handle exceptions during Decimal validation by @Viicos in #13940
  • Rebuild incomplete types during serialization inference by @Viicos in #13922

Full Changelog: v2.13.0...v2.14.0

Don't miss a new pydantic release

NewReleases is sending notifications on new releases.