Skip to content

Releases: pydantic/pydantic

v2.14.0a1 2026-05-22

22 May 13:46
86f6bbf

Choose a tag to compare

v2.14.0a1 2026-05-22 Pre-release
Pre-release

v2.14.0a1 (2026-05-22)

What's Changed

Packaging

Changes

Fixes

  • Add Mypy plugin workaround for dynamic models defined in functions by @ilevkivskyi in #13177
  • Fallback to create_model() overload definition when __base__ is set to a type variable in the Mypy plugin by @cyphercodes in #13146

New Contributors

Full Changelog: v2.13.4...v2.14.0a1

v2.13.4 2026-05-06

06 May 13:44

Choose a tag to compare

v2.13.4 (2026-05-06)

What's Changed

Packaging

Fixes

Full Changelog: v2.13.3...v2.13.4

v2.13.3 2026-04-20

20 Apr 14:48

Choose a tag to compare

v2.13.3 (2026-04-20)

What's Changed

Fixes

  • Handle AttributeError subclasses with from_attributes by @Viicos in #13096

Full Changelog: v2.13.2...v2.13.3

v2.13.2 2026-04-17

20 Apr 07:08

Choose a tag to compare

v2.13.2 (2026-04-17)

What's Changed

Fixes

  • Fix ValidationInfo.field_name missing with model_validate_json() by @Viicos in #13084

Full Changelog: v2.13.1...v2.13.2

v2.13.1 2026-04-15

15 Apr 14:58

Choose a tag to compare

v2.13.1 (2026-04-15)

What's Changed

Fixes

Full Changelog: v2.13.0...v2.13.1

v2.13.0 2026-04-13

13 Apr 10:53
46bf4fa

Choose a tag to compare

v2.13.0 (2026-04-13)

The highlights of the v2.13 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 contains the updated pydantic.v1 namespace, matching version 1.10.26 which includes support for Python 3.14.

What's Changed

See the beta releases for all changes sinces 2.12.

Packaging

  • Add zizmor for GitHub Actions workflow linting by @Viicos in #13039
  • Update jiter to v0.14.0 to fix a segmentation fault on musl Linux by @Viicos in #13064

New Features

  • Allow default factories of private attributes to take validated model data by @Viicos in #13013

Changes

Fixes

  • Change type of Any when synthesizing _build_sources for BaseSettings.__init__() signature in the mypy plugin by @Viicos in #13049
  • Fix model equality when using runtime extra configuration by @Viicos in #13062

New Contributors

Full Changelog: v2.12.0...v2.13.0

v2.13.0b3 2026-03-31

01 Apr 08:30
ee8a313

Choose a tag to compare

v2.13.0b3 2026-03-31 Pre-release
Pre-release

What's Changed

Packaging

New Features

Changes

  • Track extra fields set after init in model_fields_set by @navalprakhar in #12817
  • Do not include annotations that are not part of named tuple fields by @galuszkak in #12951
  • No longer fall back to trying all union members when the variant selected by discriminator fails to serialize by @navalprakhar in #12825

Fixes

  • Support discriminator metadata outside union type alias by @Viicos in #12785
  • Respect extras_schema when only extra_fields_behavior is set on the config in JSON Schema generation for typed dictionaries by @Viicos in #12810
  • Ensure __pydantic_private__ is set in model_construct() with user-defined model_post_init() by @nightcityblade in #12816
  • Handle all schema generation errors in InstanceOf by @Viicos in #12705
  • Allow dynamic models created with create_model() to be used as annotations in the Mypy plugin by @Br1an67 in #12879
  • Check for PlaceholderNode in Mypy plugin by @Viicos in #12929
  • Try other branches in smart union in case of omit errors by @mikeedjones in #12758
  • Patch unset attributes with MISSING during model serialization with exclude_unset by @davidhewitt in #12905
  • Ensure custom __init__() is called when using model_validate_strings() by @siewcapital in #12897

New Contributors

Full Changelog: v2.13.0b2...v2.13.0b3

v2.13.0b2 2026-02-24

24 Feb 17:09
4cd172c

Choose a tag to compare

v2.13.0b2 2026-02-24 Pre-release
Pre-release

What's Changed

Fixes

  • Fix backported V1 namespace by @Viicos in #12855
  • Allow any type form to be used in validate_as() by @bledden in #12846
  • Fix walrus operator precedence in UrlConstraints.__get_pydantic_core_schema__() by @bysiber in #12826

New Contributors

v2.13.0b1 2026-02-23

23 Feb 17:59
f29bd71

Choose a tag to compare

v2.13.0b1 2026-02-23 Pre-release
Pre-release

This is the first beta release of the 2.13 version, mainly providing bug fixes and performance improvements
for validation and serialization.

Notable changes include:

  • Add a new polymorphic_serialization option, solving issues with serialize_as_any introduced in 2.12.
  • Latest V1.10.26 release under the pydantic.v1 namespace. This version includes support for Python 3.14.
  • The pydantic-core repository was merged inside the main pydantic one.

What's Changed

Packaging

New Features

Changes

Performance

Fixes

  • Fix FieldInfo rebuilding when parameterizing generic models with an Annotated type by @Viicos in #12463
  • Fix nested model schema deduplication in JSON schema generation by @marwan-alloreview in #12494
  • Fix InitVar being ignored when using with the pydantic.Field() function by @Viicos in #12495
  • Fix support for enums with NamedTuple as values by @Viicos in #12506
  • Do not delete mock validator/serializer in rebuild_dataclass() by @Viicos in #12513
  • Require test suite to pass with free threading, switch back to global generic types cache by @davidhewitt in #12537
  • Refactor __pydantic_extra__ annotation handling by @Viicos in #12563
  • Do not add claim of UUID "safety" provision by @davidhewitt in #12567
  • Use Python hash to perform lookup in tagged union serializer by @davidhewitt in #12594
  • Do not emit serialization warning MISSING sentinel is present in a nested model by @Viicos in #12635
  • Do not eagerly evaluate annotations in signature logic by @Viicos in #12660
  • Fix serialization of typed dict unions when exclude_none is set by @davidhewitt in #12677
  • Do not reuse prebuilt serializers/validators on rebuilds by @lmmx in #12689
  • Fix type annotation of field_definitions in create_model() by @lehmann-hqs in #12734
  • Fix incorrect dataclass constructor signature when overriding class kw_only with Field() by @jfadia in #12741
  • Use typing.Union when replacing types under Python 3.14 by @Viicos in #12733
  • Improve ImportString error when internal imports fail by @tsembp in #12740
  • Fix serializing complex numbers with negative zero imaginary part by @lhnwrk in #12770
  • Preserve custom docstrings on stdlib dataclasses in JSON schema by @nightcityblade in #12815

New Contributors

v1.10.26 2025-12-18

18 Dec 15:46
d771df9

Choose a tag to compare

What's Changed

Full Changelog: v1.10.25...v1.10.26