v2.14.0
v2.14.0 2026-10-08
Added 5
- Adds support for Python 3.15
- Adds support for the multiple_of constraint in fraction and timedelta core schemas behavior changed · inferred, marked in the notes below
- Adds a __namespace__ parameter to create_model()
- Adds an ordered-dict core schema
- Adds a counter core schema
Changed 2
- Model_config attribute is no longer mutated
- Rejects newlines in NameEmail validation behavior changed · inferred, marked in the notes below
Fixed 10
- Enum constructors are called in both validation modes
- Documentation examples now raise as expected and the unused string_sub_type error code is removed removed · inferred, marked in the notes below
- OverflowError is caught during ByteSize validation
- multiple_of constraints are required to be positive
- Field name and model type stacks are always popped during schema generation
- TypeError is handled gracefully during docstring extraction
- Config propagation of stdlib dataclasses and TypedDicts in JSON Schema is fixed
- ser_json_timedelta is no longer applied to all datetime types in serialization inference
- JSON Schema defaults are encoded with a consistent configuration
- init and kw_only=False are propagated from Field() to stdlib dataclass fields
Removed 1
- Drops support for Python 3.9 requirement raised · inferred, marked in the notes below
Security 2
- Rejects large exponents in Fraction validation to address GHSA-gj4f-r7mf-jjxh
- Avoids validating URL prefix multiple times in multi host URLs to address GHSA-955g-x97g-8mcp
4 changes to check, marked in the notes below
From Pydantic
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. requirement raised · inferred
Two security fixes are fixed by this release: https://github.com/pydantic/pydantic/security/advisories/GHSA-gj4f-r7mf-jjxh and https://github.com/pydantic/pydantic/security/advisories/GHSA-955g-x97g-8mcp.
New Features
- Add support for
multiple_ofconstraint infractionandtimedeltacore schemas by @Viicos in #13873 - Add
__namespace__parameter tocreate_model()by @Viicos in #13895
Changes
- Add an
ordered-dictcore schema by @Viicos in #13796 - Add a
countercore schema by @Viicos in #13824 - Do not mutate
model_configattribute by @Viicos in #13825 - Reject newlines in
NameEmailvalidation by @Viicos in #13897 behavior changed · inferred
Fixes
- Reject large exponents in
Fractionvalidation by @Viicos in #13944. Addresses https://github.com/pydantic/pydantic/security/advisories/GHSA-gj4f-r7mf-jjxh. - Avoid validating URL prefix multiple times in multi host URLs by @Viicos in #13945. Addresses https://github.com/pydantic/pydantic/security/advisories/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_typeunused error code by @Viicos in #13821 removed · inferred - Catch
OverflowErrorduringByteSizevalidation by @Viicos in #13850 - Require
multiple_ofconstraints to be positive by @Viicos in #13862 behavior changed · inferred - Always pop field name and model type stacks during schema generation by @saquibjawedbit in #13859
- Handle
TypeErrorgracefully 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_timedeltato all datetime types in serialization inference by @Viicos in #13892 - Encode JSON Schema defaults with a consistent configuration by @Viicos in #13893
- Propagate
initandkw_only=FalsefromField()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
ZoneInfovalidation by @Viicos in #13912 - Handle exceptions during
Decimalvalidation by @Viicos in #13940 - Rebuild incomplete types during serialization inference by @Viicos in #13922
Full Changelog: https://github.com/pydantic/pydantic/compare/v2.13.0...v2.14.0