Change8

Pydantic

Data & ML

Data validation using Python type hints

Latest: v2.13.525 releases4 breaking changes15 common errorsView on GitHub

Release History

View all versions →
v2.13.54 fixes
Aug 28, 2026

This release addresses several bugs related to validator reuse, garbage collection traversal in pydantic-core, and field counting in smart unions.

v2.14.0b1
Aug 6, 2026
v2.14.0a1Breaking3 fixes2 features
May 22, 2026

Pydantic v2.14.0a1 drops support for Python 3.9, introduces PyEmscripten platform tag support, and includes several bug fixes and performance improvements, including optimizations in `model_copy()`.

v2.13.41 fix
May 6, 2026

This release includes packaging updates, bumping the libc version and adapting linker flags on macOS. A bug fix preserves `RootModel` core metadata.

v2.13.31 fix
Apr 20, 2026

This release addresses an issue with handling `AttributeError` subclasses when using `from_attributes`.

v2.13.21 fix
Apr 20, 2026

This release fixes an issue where ValidationInfo.field_name was missing when using model_validate_json().

v2.13.11 fix
Apr 15, 2026

This release fixes an issue where `ValidationInfo.data` was missing when using `model_validate_json()`.

v2.13.02 fixes1 feature
Apr 13, 2026

Pydantic v2.13 introduces support for Python 3.14 and allows default factories of private attributes to accept validated model data. This release also includes several bug fixes and minor changes.

v2.13.0b312 fixes3 features
Apr 1, 2026

This release introduces new features like `ascii_only` option for `StringConstraints` and support for `exclude_if` in computed fields. It also includes numerous bug fixes and improvements to schema generation and model handling.

v2.13.0b23 fixes
Feb 24, 2026

This release includes several bug fixes, including addressing the backported V1 namespace and improving the flexibility of `validate_as()`. It also resolves an issue with walrus operator precedence in `UrlConstraints`.

v2.13.0b1Breaking19 fixes3 features
Feb 23, 2026

This beta release of Pydantic v2.13 focuses on bug fixes and performance improvements for validation and serialization. It introduces a new `polymorphic_serialization` option and merges the `pydantic-core` repository into the main Pydantic project.

v1.10.261 fix
Dec 18, 2025

This release fixes a syntax error that occurred under Python 3.7. The full changelog provides more details on the specific changes.

v1.10.251 feature
Dec 18, 2025

This release adds minimal support for Python 3.14. The full changelog provides details on the specific changes made.

v2.12.51 fix1 feature
Nov 26, 2025

This patch release fixes a pickle error related to the MISSING sentinel and includes documentation improvements. The upcoming v2.13 release will introduce polymorphic serialization.

v2.12.45 fixes1 feature
Nov 5, 2025

This patch release fixes regressions, reverts a change in URL building for AnyUrl and Dsn types, and addresses serialization issues with IP address types.

v2.12.33 fixes2 features
Oct 17, 2025

This patch release fixes issues with the `FieldInfo` class and reverts a change to model validator signatures, now emitting a deprecation warning instead of an error for inconsistent cases. It also introduces the `FieldInfo.asdict()` method and improves related documentation.

v2.12.22 fixes
Oct 14, 2025

This release fixes an issue with a corrupted pydantic-core wheel for CPython 3.10 on manylinux2014_aarch64 and resolves a bug with recursive generic models.

v2.12.18 fixes
Oct 13, 2025

This patch release addresses several regressions introduced in the initial v2.12.0 release, including issues with validator inspection, None type conversion, and RootModel serialization.

v2.12.07 fixes5 features
Oct 7, 2025

This release introduces several new features, including an `extra` parameter for validate functions and options for serialization and URL handling. It also includes various bug fixes and initial support for Python 3.14.

v2.11.10
Oct 4, 2025
v2.12.0b1Breaking7 fixes6 features
Oct 2, 2025

This beta release introduces new features like `exclude_if` and `ValidateAs`, enhances temporal type handling, and includes several bug fixes and packaging updates, including a breaking change for incompatible `pydantic-core` versions.

v1.10.24Breaking1 fix
Sep 25, 2025

Added a user warning for Python 3.14+ due to Pydantic V1 incompatibility and fixed a mypy plugin issue for mypy v1.18.

v2.11.91 fix
Sep 13, 2025

This release backports changes from v1.10.23 to address bug fixes. The full changelog provides details on the specific changes included.

v1.10.231 fix
Sep 13, 2025

This release fixes an issue with the mypy plugin, ensuring compatibility with mypy version 1.18.

v2.11.81 fix
Sep 13, 2025

This release fixes an issue with the mypy plugin compatibility for mypy version 1.18.

Common Errors

PydanticUserError9 reports

PydanticUserError usually arises from using pydantic features incorrectly, often due to type annotation errors or incompatible usage patterns with new Pydantic versions. Review your model definitions, especially custom validators, RootModel usage, and discriminators defined with Literal, ensuring everything aligns with the expected format as per the Pydantic documentation. Correct type annotations and adapt incompatible code patterns to resolve these user errors.

ValidationError8 reports

ValidationError in pydantic usually arises when the input data doesn't conform to the schema defined in your pydantic model, such as incorrect data types or missing required fields. Resolve it by carefully checking the types, formats, and presence of your input data against the model's field definitions, and handle potential type coercion or provide default values where appropriate. Use `try...except ValidationError` blocks to catch and gracefully handle validation issues within your code.

PydanticSerializationError7 reports

PydanticSerializationError often arises when the data type you're trying to serialize isn't directly supported by Pydantic's default serializers or JSON encoding. To fix this, define custom `field_serializer` functions within your Pydantic model's field definitions to handle the specific type needing serialization, converting it into a JSON-serializable format (like a string or number) before the Pydantic `model_dump` call. Ensure your custom serializer is correctly registered and handles the problematic data type as expected during serialization.

PydanticSchemaGenerationError3 reports

PydanticSchemaGenerationError often arises when pydantic encounters unsupported or ambiguous type annotations. To fix it, ensure all type hints are resolvable and supported by pydantic, and enable `arbitrary_types_allowed = True` in your model config if you need to use types that pydantic doesn't natively understand, coupled with a suitable schema generation strategy (`@field_validator` for instance). Consider using `Annotated` to provide extra metadata to guide pydantic in complex cases.

TypeError2 reports

TypeError in Pydantic often arises from incorrect type hints or mismatched argument signatures during model creation or validation, particularly when using newer Pydantic versions with stricter type checking. Carefully review your model definitions, function calls using `_eval_type()`, and custom validators, ensuring that all type hints are accurate and that you are passing arguments with the expected names and types, especially checking for deprecated arguments like `prefer_fwd_module`. Also ensure that you are using a supported Python version, as certain features may be unavailable or produce unexpected errors in specific environments.

SchemaError2 reports

Related Data & ML Packages

Subscribe to Updates

Get notified when new versions are released

RSS Feed