Announcement: Pydantic v2.13 Release
Blog post from Pydantic
Pydantic v2.13, released on April 13th, introduces a series of new features, improvements, and bug fixes, as well as updated documentation for Pydantic Validation, Pydantic AI, and Logfire. Notable enhancements include polymorphic serialization for model subclasses, the ability to exclude computed fields using the exclude_if option, and validated data support for default factories of private attributes. Additional updates involve the introduction of an ascii_only flag for string validation, optimizations in serialization of unions, and changes in handling shallow copies of root models. The release also includes minor changes that might affect existing code, such as validation of field names in the @field_serializer decorator and updated validation processes for complex and Decimal values. Users are encouraged to review these changes on GitHub and upgrade their installations accordingly.