pypi pydantic 2.8.0b1
v2.8.0b1 (2024-06-27)

latest releases: 2.8.2, 2.8.1, 2.8.0...
7 days ago

What's Changed

Packaging

New Features

Changes

  • Add warning when "alias" is set in ignored Annotated field by @nix010 in #9170
  • Support serialization of some serializable defaults in JSON schema by @sydney-runkle in #9624
  • Relax type specification for __validators__ values in create_model by @sydney-runkle in #9697
  • Breaking Change: Improve smart union matching logic by @sydney-runkle in pydantic/pydantic-core#1322
    You can read more about our smart union matching logic here. In some cases, if the old behavior
    is desired, you can switch to left-to-right mode and change the order of your Union members.

Performance

Internal Improvements

  • ⚡️ Speed up _display_error_loc() by 25% in pydantic/v1/error_wrappers.py by @misrasaurabh1 in #9653
  • ⚡️ Speed up _get_all_json_refs() by 34% in pydantic/json_schema.py by @misrasaurabh1 in #9650
  • ⚡️ Speed up is_pydantic_dataclass() by 41% in pydantic/dataclasses.py by @misrasaurabh1 in #9652
  • ⚡️ Speed up to_snake() by 27% in pydantic/alias_generators.py by @misrasaurabh1 in #9747
  • ⚡️ Speed up unwrap_wrapped_function() by 93% in pydantic/_internal/_decorators.py by @misrasaurabh1 in #9727

Fixes

New Contributors

Full Changelog: v2.7.4...v2.8.0b1/

Don't miss a new pydantic release

NewReleases is sending notifications on new releases.