pypi pydantic 2.13.0b1
v2.13.0b1 2026-02-23

latest releases: 2.14.3, 2.14.2, 1.10.27...
8 months ago

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

Don't miss a new pydantic release

NewReleases is sending notifications on new releases.