Skip to content

Releases: pydantic/pydantic

v2.5.0b1 (2023-11-09)

09 Nov 17:30
9eec4d6
Compare
Choose a tag to compare
v2.5.0b1 (2023-11-09) Pre-release
Pre-release

What's Changed

Packaging

  • Update pydantic-core from 2.10.1 to 2.14.1, significant changes from these updates are described below, full changelog here

New Features

Changes

  • Significant Change: replace ultra_strict with new smart union implementation, the way unions are validated has changed significantly to improve performance and correctness, we have worked hard to absolutely minimise the number of cases where behaviour has changed, see the PR for details - by @davidhewitt in pydantic/pydantic-core#867
  • Add support for instance method reassignment when extra='allow' by @sydney-runkle in #7683
  • Support JSON schema generation for Enum types with no cases by @sydney-runkle in #7927
  • Warn if a class inherits from Generic before BaseModel by @alexmojaki in #7891

Performance

Fixes

New Contributors

pydantic

Read more

v2.4.2 2023-09-27

27 Sep 17:38
d1634da
Compare
Choose a tag to compare

What's Changed

Fixes

  • Fix bug with JSON schema for sequence of discriminated union by @dmontagu in #7647
  • Fix schema references in discriminated unions by @adriangb in #7646
  • Fix json schema generation for recursive models by @adriangb in #7653
  • Fix models_json_schema for generic models by @adriangb in #7654
  • Fix xfailed test for generic model signatures by @adriangb in #7658

New Contributors

Full Changelog: v2.4.1...v2.4.2/

V1.10.13 2023-09-27

27 Sep 17:35
8822578
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.10.12...v1.10.13

v2.4.1 2023-09-26

26 Sep 14:14
07b23ef
Compare
Choose a tag to compare

What's Changed

Packaging

Fixes

Full Changelog: v2.4.0...v2.4.1/

v2.4.0 2023-09-25

25 Sep 13:50
1f59075
Compare
Choose a tag to compare

What's Changed

Packaging

New Features

Changes

Performance

  • Simplify flattening and inlining of CoreSchema by @adriangb in #7523
  • Remove unused copies in CoreSchema walking by @adriangb in #7528
  • Add caches for collecting definitions and invalid schemas from a CoreSchema by @adriangb in #7527
  • Eagerly resolve discriminated unions and cache cases where we can't by @adriangb in #7529
  • Replace dict.get and dict.setdefault with more verbose versions in CoreSchema building hot paths by @adriangb in #7536
  • Cache invalid CoreSchema discovery by @adriangb in #7535
  • Allow disabling CoreSchema validation for faster startup times by @adriangb in #7565

Fixes

  • Fix config detection for TypedDict from grandparent classes by @dmontagu in #7272
  • Fix hash function generation for frozen models with unusual MRO by @dmontagu in #7274
  • Make strict config overridable in field for Path by @hramezani in #7281
  • Use ser_json_<timedelta|bytes> on default in GenerateJsonSchema by @Kludex in #7269
  • Adding a check that alias is validated as an identifier for Python by @andree0 in #7319
  • Raise an error when computed field overrides field by @sydney-runkle in #7346
  • Fix applying SkipValidation to referenced schemas by @adriangb in #7381
  • Enforce behavior of private attributes having double leading underscore by @lig in #7265
  • Standardize __get_pydantic_core_schema__ signature by @hramezani in #7415
  • Fix generic dataclass fields mutation bug (when using TypeAdapter) by @sydney-runkle in #7435
  • Fix TypeError on model_validator in wrap mode by @pmmmwh in #7496
  • Improve enum error message by @hramezani in #7506
  • Make repr work for instances that failed initialization when handling ValidationErrors by @dmontagu in #7439
  • Fixed a regular expression denial of service issue by limiting whitespaces by @prodigysml in #7360
  • Fix handling of UUID values having UUID.version=None by @lig in #7566
  • Fix __iter__ returning private cached_property info by @sydney-runkle in #7570
  • Improvements to version info message by @samuelcolvin in #7594

New Contributors

Full Changelog: v2.3.0...v2.4.0

v2.3.0 2023-08-23

23 Aug 18:25
7f1a643
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.2.1...v2.2.2

v2.2.1 2023-08-18

18 Aug 16:12
5a1fdfa
Compare
Choose a tag to compare

What's Changed

  • Make xfailing test for root model extra stop xfailing by @dmontagu in #6937
  • Optimize recursion detection by stopping on the second visit for the … by @mciucu in #7160
  • fix link in docs by @tlambert03 in #7166
  • Bump pydantic-core to 2.6.1 and prepare 2.2.1 release by @adriangb in #7176

New Contributors

Full Changelog: v2.2.0...v2.2.1

v2.2.0 2023-08-17

17 Aug 12:02
@lig lig
d5a4221
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.1.1...v2.2.0

v2.1.1 2023-07-25

25 Jul 22:56
cfd5b6c
Compare
Choose a tag to compare

What's Changed

v2.1.0 2023-07-25

25 Jul 16:34
3284a24
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.0.3...v2.1.0