Change8

Pydantic

Data & ML

Data validation using Python type hints

Latest: v2.13.0b230 releases10 breaking changes13 common errorsView on GitHub

Release History

v2.13.0b23 fixes
Feb 24, 2026

This release focuses on bug fixes, including resolving an issue with the backported V1 namespace and improving flexibility in type validation via validate_as().

v2.13.0b1Breaking11 fixes2 features
Feb 23, 2026

This beta release focuses on bug fixes and performance improvements for validation and serialization, notably introducing the `polymorphic_serialization` option and updating the internal `pydantic-core` repository structure.

v1.10.261 fix
Dec 18, 2025

This patch release fixes a syntax error specifically affecting users running Pydantic on Python 3.7.

v1.10.251 feature
Dec 18, 2025

This release adds minimal support for Python 3.14 to the Pydantic v1.10 series.

v2.12.51 fix
Nov 26, 2025

A patch release fixing a pickle error related to the MISSING sentinel in model_construct and providing documentation updates.

v2.12.4Breaking4 fixes2 features
Nov 5, 2025

A patch release fixing regressions in URL building, defaultdict validation, and TypedDict forward references, while improving IP address serialization under serialize_as_any.

v2.12.32 fixes2 features
Oct 17, 2025

This patch release restores compatibility for 'after' model validator signatures by issuing warnings instead of errors and introduces the FieldInfo.asdict() method.

v2.12.22 fixes
Oct 14, 2025

This patch release fixes a corrupted CPython 3.10 wheel for ARM64 and resolves a bug involving recursive generic models with parent classes.

v2.12.1Breaking8 fixes
Oct 13, 2025

This patch release addresses several regressions introduced in v2.12.0, specifically focusing on serialization fixes for RootModel and serialize_as_any, as well as Python 3.14 compatibility.

v2.12.0Breaking7 fixes5 features
Oct 7, 2025

Pydantic v2.12.0 introduces initial Python 3.14 support, new serialization options like exclude_computed_fields, and various improvements to TypeAdapter and JSON Schema generation.

v2.12.0b1Breaking6 fixes6 features
Oct 2, 2025

Pydantic v2.12.0b1 introduces field-level 'exclude_if', the 'ValidateAs' helper, and PEP 728 support, while enforcing stricter pydantic-core version requirements.

v1.10.24Breaking1 fix1 feature
Sep 25, 2025

This release introduces a warning for Python 3.14 incompatibility and fixes a plugin issue for mypy v1.18.

v2.11.91 fix
Sep 13, 2025

Pydantic v2.11.9 is a maintenance release that backports changes from version 1.10.23.

v1.10.231 fix
Sep 13, 2025

This patch release fixes a compatibility issue with the mypy plugin when using mypy 1.18.

v2.11.81 fix
Sep 13, 2025

This patch release addresses a compatibility issue between the Pydantic mypy plugin and mypy version 1.18.

v2.12.0a1Breaking7 fixes5 features
Jul 26, 2025

Pydantic v2.12.0a1 introduces initial support for Python 3.14, a new model completion hook, and experimental MISSING sentinels, while refining validator behavior and JSON schema generation.

v2.11.71 fix
Jun 14, 2025

This patch release addresses a specific bug in FieldInfo building where instances were not being copied correctly, potentially leading to shared state issues.

v2.11.62 fixes
Jun 13, 2025

This patch release addresses internal issues regarding dataclass field rebuilding and ensures original field assignments are correctly preserved on FieldInfo.

v2.11.53 fixes
May 23, 2025

Pydantic v2.11.5 is a patch release focusing on fixes for model rebuilding logic and FieldInfo processing.

v2.11.45 fixes1 feature
Apr 29, 2025

This release restores the ability to specify configuration and bases simultaneously in create_model() and includes several bug fixes for generics, decimal constraints, and the mypy plugin.

v2.11.31 fix
Apr 8, 2025

This patch release fixes an issue where field descriptions were lost during model rebuilding and updates the internal Pydantic V1 copy to version 1.10.21.

v2.11.26 fixes
Apr 3, 2025

Pydantic v2.11.2 is a patch release that includes several bug fixes for private attributes, discriminated unions, and the mypy plugin, alongside a bump to pydantic-core v2.33.1.

v2.11.11 fix
Mar 28, 2025

Pydantic v2.11.1 is a patch release that fixes a specific issue where 'definitions-ref' schemas were being incorrectly overridden when containing serialization metadata.

v2.11.0Breaking7 fixes9 features
Mar 27, 2025

This release drops support for Python 3.8 and introduces full support for PEP 695 generics and UUID v6-v8. It includes significant performance optimizations for schema building and attribute setting, alongside several URL-related bug fixes.

v2.11.0b21 fix1 feature
Mar 17, 2025

This release introduces experimental support for free threading and fixes an issue where the NotRequired qualifier was ignored in stringified annotations.

v2.11.0b1Breaking7 fixes7 features
Mar 6, 2025

Pydantic v2.11.0b1 drops Python 3.8 support, introduces full PEP 695 support, and optimizes performance through improved caching and schema building. It also refactors internal schema generation and updates the behavior of Final attributes.

v2.11.0a25 fixes3 features
Feb 10, 2025

Pydantic v2.11.0a2 is an alpha release primarily focused on improving build time performance for models and core schema generation, alongside several JSON Schema and serialization bug fixes.

v2.11.0a1Breaking6 fixes5 features
Jan 30, 2025

Pydantic v2.11.0a1 is an alpha release focused on improving build-time performance for core schema generation and Pydantic models. It introduces support for PEP 695 syntax and removes support for Python 3.8.

v2.10.62 fixes
Jan 24, 2025

This patch release addresses issues with JSON Schema reference collection involving 'examples' keys and fixes Python serialization for URL objects.

v2.10.52 fixes
Jan 10, 2025

Pydantic v2.10.5 is a maintenance release that removes a custom MRO implementation and fixes URL serialization within Union types.

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.

NotImplementedError2 reports

The "NotImplementedError" in pydantic typically arises when an abstract method or functionality relying on newer Python features (like generics or specific library versions) is not yet fully implemented for the current Python environment. Address this by upgrading pydantic to the latest version, and ensure your Python version meets the minimum requirements for the features being used, potentially updating Python if needed. If the error persists, investigate if the method call is expected to be available or an abstraction that should be implemented by a subclass, and adjust your expectations or provide the specific implementation.

Related Data & ML Packages

Subscribe to Updates

Get notified when new versions are released

RSS Feed