Python Pydantic Library Development 1 min read

Pydantic 2.14.0 Adds Python 3.15 Support and Patches Two Security Issues

Pydantic 2.14.0 drops Python 3.9 support, adds compatibility for Python 3.15, and resolves two security vulnerabilities alongside various feature improvements.

Pydantic 2.14.0 drops support for Python 3.9 while adding Python 3.15 compatibility. The release fixes two security advisories, GHSA-gj4f-r7mf-jjxh and GHSA-955g-x97g-8mcp. The first patch addresses Fraction validation by rejecting inputs with large exponents, and the second stops multi-host URLs from validating prefixes multiple times.

Core schemas for fraction and timedelta now take the multiple_of constraint, with the library enforcing that these values must be positive numbers. Meanwhile, dynamic model creation via create_model() adds a __namespace__ parameter, and new core schemas arrive for ordered-dict and counter types.

The update also stops Pydantic from mutating the model_config attribute, makes NameEmail validation reject newlines, and fixes uncaught OverflowError exceptions during ByteSize validation. Furthermore, enum constructor execution is corrected across both validation modes, and configuration propagation gets improved for standard library dataclasses and TypedDict structures during JSON Schema generation.

Maintainers state the release contains minor changes classified as non-breaking under the project's versioning policy, and recommend reviewing updates prior to upgrading.