Zum Inhalt springen

Pydantic Release Notes

Einträge
39
Quellen
1
Zuletzt aktualisiert

Folge Pydantic, um die Release Notes in deinen Feed zu holen.

Pydantic

Pydantic v2.12.5

Behebt einen Pickle-Fehler bei model_construct() mit MISSING als Standardwert und enthält Dokumentationsverbesserungen.

v2.12.5 (2025-11-26)

This is the fifth 2.12 patch release, addressing an issue with the MISSING sentinel and providing several documentation improvements.

The next 2.13 minor release will be published in a couple weeks, and will include a new polymorphic serialization feature addressing the remaining unexpected changes to the serialize as any behavior.

  • Fix pickle error when using model_construct() on a model with MISSING as a default value by @ornariece in #12522.
  • Several updates to the documentation by @Viicos.

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.12.4...v2.12.5

Originalquelle(öffnet in neuem Tab)Problem melden

Pydantic

Pydantic v2.12.4

Fix für Vorwärtsreferenzen in TypedDict, exclude_if schließt Felder aus JSON-Schema-Pflichtfeldern aus, URL-Änderung zurückgenommen.

v2.12.4 (2025-11-05)

This is the fourth 2.12 patch release, fixing more regressions, and reverting a change in the build() method of the AnyUrl and Dsn types.

This patch release also fixes an issue with the serialization of IP address types, when serialize_as_any is used. The next patch release will try to address the remaining issues with serialize as any behavior by introducing a new polymorphic serialization feature, that should be used in most cases in place of serialize as any.

  • Fix issue with forward references in parent TypedDict classes by @Viicos in #12427.

    This issue is only relevant on Python 3.14 and greater.

  • Exclude fields with exclude_if from JSON Schema required fields by @Viicos in #12430

  • Revert URL percent-encoding of credentials in the build() method of the AnyUrl and Dsn types by @davidhewitt in pydantic-core#1833.

    This was initially considered as a bugfix, but caused regressions and as such was fully reverted. The next release will include an opt-in option to percent-encode components of the URL.

  • Add type inference for IP address types by @davidhewitt in pydantic-core#1868. …

Originalquelle(öffnet in neuem Tab)Problem melden

Pydantic

Pydantic v2.12.3

Warnt bei ungültigen After-Model-Validator-Signaturen und fügt FieldInfo.asdict() hinzu.

v2.12.3 (2025-10-17)

What's Changed

This is the third 2.13 patch release, fixing issues related to the FieldInfo class, and reverting a change to the supported after model validator function signatures.

  • Raise a warning when an invalid after model validator function signature is raised by @Viicos in #12414. Starting in 2.12.0, using class methods for after model validators raised an error, but the error wasn't raised concistently. We decided to emit a deprecation warning instead.
  • Add FieldInfo.asdict() method, improve documentation around FieldInfo by @Viicos in #12411. This also adds back support for mutations on FieldInfo classes, that are reused as Annotated metadata. However, note that this is still not a supported pattern. Instead, please refer to the added example in the documentation.

The blog post section on changes was also updated to document the changes related to serialize_as_any.

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.12.2...v2.12.3

Originalquelle(öffnet in neuem Tab)Problem melden

Pydantic

Pydantic v2.12.2

Behebt einen Fehler mit rekursiven generischen Modellen und veröffentlicht ein korrigiertes pydantic-core-Rad.

v2.12.2 (2025-10-14)

What's Changed

Fixes

  • Release a new pydantic-core version, as a corrupted CPython 3.10 manylinux2014_aarch64 wheel got uploaded (pydantic-core#1843).
  • Fix issue with recursive generic models with a parent model class by @Viicos in #12398

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.12.1...v2.12.2

Originalquelle(öffnet in neuem Tab)Problem melden

Pydantic

Pydantic v2.12.1

Behebt mehrere Regressionen, darunter Annotationsauswertung, None-Konvertierung, Validator-Signaturen und root-Model-Serialisierung.

v2.12.1 (2025-10-13)

GitHub release

What's Changed

This is the first 2.12 patch release, addressing most (but not all yet) regressions from the initial 2.12.0 release.

Fixes

  • Do not evaluate annotations when inspecting validators and serializers by @Viicos in #12355
  • Make sure None is converted as NoneType in Python 3.14 by @Viicos in #12370
  • Backport V1 runtime warning when using Python 3.14 by @Viicos in #12367
  • Fix error message for invalid validator signatures by @Viicos in #12366
  • Populate field name in ValidationInfo for validation of default value by @Viicos in pydantic-core#1826
  • Encode credentials in MultiHostUrl builder by @willswire in pydantic-core#1829
  • Respect field serializers when using serialize_as_any serialization flag by @davidhewitt in pydantic-core#1829
  • Fix various RootModel serialization issues by @davidhewitt in pydantic-core#1836

New Contributors …

Originalquelle(öffnet in neuem Tab)Problem melden

Pydantic

Pydantic 2.12.0

Pydantic 2.12.0 ist die finale Version der 2.12-Reihe und bietet neue Funktionen sowie erste Unterstützung für Python 3.14.

<!-- Release notes generated using configuration in .github/release.yml at v2.12.0 -->

v2.12.0 (2025-10-07)

[!NOTE] Check out the blog post for release highlights. 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.

[!WARNING] The core functionality of Pydantic V1 is not compatible with Python 3.14 or greater. This was fixed in v1.10.26.

This is the final 2.12 release. It features the work of 20 external contributors and provides useful new features, along with initial Python 3.14 support.

Changelog (see the 2.12.0a1 and 2.12.0b1 releases for additional changes since 2.11):

Packaging

  • Update V1 copy to v1.10.24 by @Viicos in #12338

New Features

  • Add extra parameter to the validate functions by @anvilpete in #12233 …

Originalquelle(öffnet in neuem Tab)Problem melden

Pydantic

Pydantic 2.12.0b1

Die erste Beta von Pydantic 2.12 fügt unter anderem die Annotation ValidateAs, PEP-728-Unterstützung und neue Konfigurationsoptionen für Zeittypen hinzu.

v2.12.0b1 (2025-10-03)

This is the first beta release of the upcoming 2.12 release.

What's Changed

Packaging

  • Bump pydantic-core to v2.40.1 by @Viicos in #12314

New Features

  • Add support for exclude_if at the field level by @andresliszt in #12141
  • Add ValidateAs annotation helper by @Viicos in #11942
  • Add configuration options for validation and JSON serialization of temporal types by @ollz272 in #12068
  • Add support for PEP 728 by @Viicos in #12179
  • Add field name in serialization error by @NicolasPllr1 in pydantic-core#1799
  • Add option to preserve empty URL paths by @davidhewitt in pydantic-core#1789

Changes

  • Raise error if an incompatible pydantic-core version is installed by @Viicos in #12196
  • Remove runtime warning for experimental features by @Viicos in #12265
  • Warn if registering virtual subclasses on Pydantic models by @Viicos in #11669

Fixes …

Originalquelle(öffnet in neuem Tab)Problem melden

Pydantic

Pydantic 1.10.24

Pydantic 1.10.24 warnt nun bei Verwendung mit Python 3.14 und behebt ein Problem mit dem mypy-Plugin in mypy 1.18.

What's Changed

  • Add user warning when using Python 3.14 by @Viicos in https://github.com/pydantic/pydantic/pull/12263 Pydantic V1 will not work with Python 3.14 and greater. A warning is now raised as no actual error show up when using it, but the core behavior will silently get broken at runtime.
  • Fix mypy plugin issue for mypy v1.18 by @cdce8p in https://github.com/pydantic/pydantic/pull/12254 This fixes another mypy issue that was discovered after the previous v1.10.23 release.

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.23...v1.10.24

Originalquelle(öffnet in neuem Tab)Problem melden

Pydantic

Pydantic 2.12.0a1

Die erste Alpha von Pydantic 2.12 bietet erste Unterstützung für Python 3.14 sowie neue Funktionen wie einen __pydantic_on_complete__-Hook.

v2.12.0a1 (2025-07-26)

This is the first alpha release of the upcoming 2.12 release, which adds initial support for Python 3.14.

What's Changed

New Features

  • Add __pydantic_on_complete__() hook that is called once model is fully ready to be used by @DouweM in #11762
  • Add initial support for Python 3.14 by @Viicos in #11991
  • Add regex patterns to JSON schema for Decimal type by @Dima-Bulavenko in #11987
  • Add support for doc attribute on dataclass fields by @Viicos in #12077
  • Add experimental MISSING sentinel by @Viicos in #11883

Changes

  • Allow config and bases to be specified together in create_model() by @Viicos in #11714
  • Move some field logic out of the GenerateSchema class by @Viicos in #11733
  • Always make use of inspect.getsourcelines() for docstring extraction on Python 3.13 and greater by @Viicos in #11829
  • Only support the latest Mypy version by @Viicos in #11832 …

Originalquelle(öffnet in neuem Tab)Problem melden

Pydantic

Pydantic 2.11.5

Pydantic 2.11.5 behebt mehrere Probleme bei der Modell-Neuerstellung, unter anderem mit Metadaten und Mock-Validatoren.

<!-- Release notes generated using configuration in .github/release.yml at v2.11.5 -->

What's Changed

Fixes

  • Check if FieldInfo is complete after applying type variable map by @Viicos in #11855
  • Do not delete mock validator/serializer in model_rebuild() by @Viicos in #11890
  • Do not duplicate metadata on model rebuild by @Viicos in #11902

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.4...v2.11.5

Originalquelle(öffnet in neuem Tab)Problem melden

Pydantic

Pydantic v2.11.4

Pydantic v2.11.4 behebt mehrere Fehler, entfernt eine Umgehung für den Generics-Cache und erlaubt das gleichzeitige Angeben von Konfiguration und Basisklassen in create_model().

What's Changed

Packaging

  • Bump mkdocs-llmstxt to v0.2.0 by @Viicos in #11725

Changes

  • Allow config and bases to be specified together in create_model() by @Viicos in #11714. This change was backported as it was previously possible (although not meant to be supported) to provide model_config as a field, which would make it possible to provide both configuration and bases.

Fixes

  • Remove generics cache workaround by @Viicos in #11755
  • Remove coercion of decimal constraints by @Viicos in #11772
  • Fix crash when expanding root type in the mypy plugin by @Viicos in #11735
  • Fix issue with recursive generic models by @Viicos in #11775
  • Traverse function-before schemas during schema gathering by @Viicos in #11801

Originalquelle(öffnet in neuem Tab)Problem melden

Pydantic

Pydantic v2.11.3

Pydantic v2.11.3 aktualisiert die V1-Kopie und bewahrt die Feldbeschreibung beim Neuerstellen von Modellfeldern.

<!-- Release notes generated using configuration in .github/release.yml at v2.11.3 -->

What's Changed

Packaging

Fixes

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.2...v2.11.3

Originalquelle(öffnet in neuem Tab)Problem melden

Pydantic

Pydantic v2.11.2

Pydantic v2.11.2 aktualisiert pydantic-core, behebt Probleme mit privaten Attributen, vererbten Feldern und diskriminierten Unions und verbessert die Mypy-Plugin-Behandlung.

<!-- Release notes generated using configuration in .github/release.yml at v2.11.2 -->

What's Changed

Fixes

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.1...v2.11.2

Originalquelle(öffnet in neuem Tab)Problem melden