Pydantic v2.14.0b1

v2.14.0b1Pre-release

v2.14.0b1 2026-08-06

Added 3
  • Add agent skills to the packaging
  • Add support for EllipsisType
  • Add initial support for Python 3.15, although not all 3.15 specific features are supported yet
Changed 11
  • Populate __slots__ from generic class during parameterization
  • Avoid using explicit Any in the Mypy plugin
  • Support Fraction type in pydantic-core
  • Fix application of constraints in pipeline API
  • Optimize type lookup logic in core schema generation
  • Add a named-tuple core schema
Fixed 21
  • Validate falsy AliasGenerator outputs
  • Do not resolve recursive 'definitions-ref' schemas in schema cleaning
  • Fix missing max_length check on lazy iteration validation
  • Handle missing errors with default factories taking validated data
  • Recognise WindowsPath as a schema type
  • Fix application of nested operators in pipeline API
Security 1
  • Use constant-time comparison for SecretStr and SecretBytes types

From Pydantic

What's Changed

This is the first beta release of the 2.14 version, providing some new features and performance improvements for model builds.

This release is the first to provide initial support for Python 3.15, although not all 3.15 specific features are supported yet.

Packaging
  • Add agent skills by @Viicos in #13193
New Features
  • Add support for EllipsisType by @Viicos in #13484
  • Add initial support for Python 3.15 by @Viicos in #13587
Changes
  • Populate __slots__ from generic class during parameterization by @Viicos in #13243
  • Avoid using explicit Any in the Mypy plugin by @Viicos in #13196
  • Support Fraction type in pydantic-core by @Viicos in #13339
  • Use constant-time comparison for SecretStr and SecretBytes types by @Viicos in #13518
  • Fix application of constraints in pipeline API by @Viicos in #13516
  • Optimize type lookup logic in core schema generation by @Viicos in #13573
  • Add a named-tuple core schema by @Viicos in #13505
  • Raise explicit TypeError on invalid index_key serialization wrap handler by @Viicos in #13506
Performance
  • Cache ModelPrivateAttr.default_factory_takes_validated_data property by @Viicos in #13390
  • Introduce micro-optimizations for model class building by @dmontagu in #13540
  • Try Format.VALUE before FORWARDREF when evaluating annotations in ModelMetaclass by @Viicos in #13584
  • Optimize type lookup logic in core schema generation by @Viicos in #13573
  • Avoid exponential core schema traversal in gather_schemas_for_cleaning() by @dmontagu in #13523
Fixes
  • Validate falsy AliasGenerator outputs by @jiyujie2006 in #13248
  • Do not resolve recursive 'definitions-ref' schemas in schema cleaning by @Viicos in #13276
  • Fix missing max_length check on lazy iteration validation by @davidhewitt in #13278
  • Handle missing errors with default factories taking validated data by @Viicos in #13291
  • Recognise WindowsPath as a schema type by @davidhewitt in #13326
  • Fix application of nested operators in pipeline API by @Viicos in #13363
  • Fix type variable substitution in __pydantic_extra__ by @Viicos in #13391
  • Fix json_schema_extra dict being dropped when a callable follows it in Annotated by @Srivatsa03 in #13374
  • Skip RootModel.__init__() in Mypy plugin by @Viicos in #13441
  • Defer placeholders in Mypy plugin by @Viicos in #13442
  • Do not ignore timezone offset when using 'seconds'/'milliseconds' temporal_mode by @Viicos in #13436
  • Make model rebuilding logic thread safe by @Viicos in #13438
  • Fix Interval zero bounds silently dropped in pipeline API by @pctablet505 in #13452
  • Sync RootModel.model_dump() signature with its parent by @Viicos in #13456
  • Return NotImplemented from URL ordering comparisons with foreign types by @chinesepowered in #13495
  • Don't error on unhashable generic arguments on generic Pydantic models by @Viicos in #13515
  • Fix population of SerializationInfo.exclude_computed_fields by @Viicos in #13560
  • Fix serialization of ValidateAs by @Viicos in #13487
  • Allow reuse of validators when plugins are set by @Viicos in #13535
  • Avoid double-wrapping polymorphism trampoline for model serializers by @davidhewitt in #13552
  • Add AllowInfNan type to the field metadata gathering by @mberdyshev in #13586
New Contributors
  • @jiyujie2006 made their first contribution in #13248
  • @pctablet505 made their first contribution in #13452
  • @LuShadowX made their first contribution in #13503
  • @mberdyshev made their first contribution in #13586

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.14.0a1...v2.14.0b1

View original

Upgraded? How did it go?

Discussion