pydantic breaking changes

pypi

394 curated breaking changes across major versions of pydantic. Use this as a migration checklist before bumping dependencies.

394
changes
Breaking changes by transition
  • 2.9.0 \u2192 2.9.0behavior

    Use `re.Pattern.search` instead of `re.Pattern.match` for consistency with `rust` behavior by @tinez in [pydantic/pydantic-core#1368](https://github.com/pydantic/pydantic-core/pull/1368)

  • 2.9.0 \u2192 2.9.0behavior

    For more info (how to replicate old behavior) on this change, see [here](https://docs.pydantic.dev/dev/concepts/json_schema/#merging-json_schema_extra)

  • 2.9.0 \u2192 2.9.0breaking

    Add `Config.val_json_bytes` by @josh-newman in [#9770](https://github.com/pydantic/pydantic/pull/9770)

  • 2.9.0 \u2192 2.9.0breaking

    Raise helpful warning when `self` isn't returned from model validator by @sydney-runkle in [#10255](https://github.com/pydantic/pydantic/pull/10255)

  • 2.9.0 \u2192 2.9.0breaking

    Breaking Change: in `pydantic-core`, change `metadata` type hint in core schemas from `Any` -> `Dict[str, Any] | None` by @sydney-runkle in [pydantic/pydantic-core#1411](https://github.com/pydantic/pydantic-core/pull/1411)

  • 2.9.0 \u2192 2.9.0breaking

    Show value of wrongly typed data in `pydantic-core` serialization warning by @BoxyUwU in [pydantic/pydantic-core#1377](https://github.com/pydantic/pydantic-core/pull/1377)

  • 2.9.0 \u2192 2.9.0breaking

    Improve runtime errors for string constraints like `pattern` for incompatible types by @sydney-runkle in [#10158](https://github.com/pydantic/pydantic/pull/10158)

  • 2.9.0 \u2192 2.9.0breaking

    Move annotation compatibility errors to validation phase by @sydney-runkle in [#9999](https://github.com/pydantic/pydantic/pull/9999)

  • 2.9.0 \u2192 2.9.0breaking

    Refactor annotation injection for known (often generic) types by @sydney-runkle in [#9979](https://github.com/pydantic/pydantic/pull/9979)

  • 2.9.0 \u2192 2.9.0breaking

    Breaking Change: Merge `dict` type `json_schema_extra` by @sydney-runkle in [#9792](https://github.com/pydantic/pydantic/pull/9792)

  • 2.9.0 \u2192 2.9.0breaking

    Add tagged union serializer that attempts to use `str` or `callable` discriminators to select the correct serializer by @sydney-runkle in in [pydantic/pydantic-core#1397](https://github.com/pydantic/pydantic-core/pull/1397)

  • 2.9.0 \u2192 2.9.0breaking

    Support parametrized `PathLike` types by @nix010 in [#9764](https://github.com/pydantic/pydantic/pull/9764)

  • 2.9.0 \u2192 2.9.0breaking

    Allow validators to customize validation JSON schema by @Viicos in [#10094](https://github.com/pydantic/pydantic/pull/10094)

  • 2.9.0 \u2192 2.9.0breaking

    Allow `WithJsonSchema` to inject `$ref`s w/ `http` or `https` links by @dAIsySHEng1 in [#9863](https://github.com/pydantic/pydantic/pull/9863)

  • 2.9.0 \u2192 2.9.0breaking

    Add support for `annotated_types.Not` by @aditkumar72 in [#10210](https://github.com/pydantic/pydantic/pull/10210)

  • 2.9.0 \u2192 2.9.0breaking

    Support `complex` number by @changhc in [#9654](https://github.com/pydantic/pydantic/pull/9654)

  • 2.9.0 \u2192 2.9.0breaking

    Add DSN for Snowflake by @aditkumar72 in [#10128](https://github.com/pydantic/pydantic/pull/10128)

  • 2.9.0 \u2192 2.9.0breaking

    Add support for `ZoneInfo` by @Youssefares in [#9896](https://github.com/pydantic/pydantic/pull/9896)

  • 2.9.0 \u2192 2.9.0breaking

    Using cached internal import for `BaseModel` by @sydney-runkle in [#10013](https://github.com/pydantic/pydantic/pull/10013)

  • 2.9.0 \u2192 2.9.0breaking

    Initial start at improving import times for modules, using caching primarily by @sydney-runkle in [#10009](https://github.com/pydantic/pydantic/pull/10009)

  • 2.9.0 \u2192 2.9.0deprecated

    Deprecate passing a dict to the `Examples` class by @Viicos in [#10181](https://github.com/pydantic/pydantic/pull/10181)

  • 2.9.0 \u2192 2.9.0removed

    Remove `'allOf'` JSON schema workarounds by @dpeachey in [#10029](https://github.com/pydantic/pydantic/pull/10029)

  • 2.9.0 \u2192 2.9.0removed

    Simplify internal generics logic - remove generator overhead by @sydney-runkle in [#10059](https://github.com/pydantic/pydantic/pull/10059)

  • 2.9.0 \u2192 2.9.0removed

    Remove `initial_metadata` from internal metadata construct by @sydney-runkle in [#10194](https://github.com/pydantic/pydantic/pull/10194)

  • 2.9.0 \u2192 2.9.0removed

    Remove `typed_dict_cls` data from `CoreMetadata` by @sydney-runkle in [#10180](https://github.com/pydantic/pydantic/pull/10180)

  • 2.8.0 \u2192 2.8.1breaking

    Fix breaking change in `to_snake` from v2.7 -> v2.8 by @sydney-runkle in [#9812](https://github.com/pydantic/pydantic/pull/9812)

  • 2.8.0 \u2192 2.8.1breaking

    Bump `pydantic-core` to `v2.20.1`, `pydantic-extra-types` to `v2.9.0` by @sydney-runkle in [#9832](https://github.com/pydantic/pydantic/pull/9832)

  • 2.8.0 \u2192 2.8.1breaking

    Bump `ruff` to `v0.5.0` and `pyright` to `v1.1.369` by @sydney-runkle in [#9801](https://github.com/pydantic/pydantic/pull/9801)

  • 2.8.0 \u2192 2.8.1breaking

    Handle negative fractional durations correctly by @sydney-runkle in [pydantic/speedate#71](https://github.com/pydantic/speedate/pull/71)

  • 2.8.0 \u2192 2.8.1breaking

    Fix millisecond fraction being handled with the wrong scale by @davidhewitt in [pydantic/speedate#65](https://github.com/pydantic/speedate/pull/65)

  • 2.8.0 \u2192 2.8.1breaking

    Support time duration more than 23 by @nix010 in [pydantic/speedate#64](https://github.com/pydantic/speedate/pull/64)

  • 2.8.0 \u2192 2.8.1breaking

    Fix list constraint json schema application by @sydney-runkle in [#9818](https://github.com/pydantic/pydantic/pull/9818)

  • 2.8.0 \u2192 2.8.0api

    Experimental: Add pipeline API by @adriangb in [#9459](https://github.com/pydantic/pydantic/pull/9459)

  • 2.8.0 \u2192 2.8.0api

    Bump pyright to `v1.1.367` and add type checking tests for pipeline API by @adriangb in [#9674](https://github.com/pydantic/pydantic/pull/9674)

  • 2.8.0 \u2192 2.8.0behavior

    Support serialization of some serializable defaults in JSON schema by @sydney-runkle in [#9624](https://github.com/pydantic/pydantic/pull/9624)

  • 2.8.0 \u2192 2.8.0breaking

    Update citation version automatically with new releases by @sydney-runkle in [#9673](https://github.com/pydantic/pydantic/pull/9673)

  • 2.8.0 \u2192 2.8.0breaking

    Update `pydantic.v1` stub to `v1.10.17` by @sydney-runkle in [#9707](https://github.com/pydantic/pydantic/pull/9707)

  • 2.8.0 \u2192 2.8.0breaking

    General package updates to prep for `v2.8.0b1` by @sydney-runkle in [#9741](https://github.com/pydantic/pydantic/pull/9741)

  • 2.8.0 \u2192 2.8.0breaking

    Bump `pydantic-core` to `v2.20.0` by @sydney-runkle in [#9745](https://github.com/pydantic/pydantic/pull/9745)

  • 2.8.0 \u2192 2.8.0breaking

    Add support for Python 3.13 by @sydney-runkle in [#9743](https://github.com/pydantic/pydantic/pull/9743)

  • 2.8.0 \u2192 2.8.0breaking

    Update `pdm` version used for `pdm.lock` to v2.16.1 by @sydney-runkle in [#9761](https://github.com/pydantic/pydantic/pull/9761)

  • 2.8.0 \u2192 2.8.0breaking

    Update to `ruff` `v0.4.8` by @Viicos in [#9585](https://github.com/pydantic/pydantic/pull/9585)

  • 2.8.0 \u2192 2.8.0breaking

    Experimental: support `defer_build` for `TypeAdapter` by @MarkusSintonen in [#8939](https://github.com/pydantic/pydantic/pull/8939)

  • 2.8.0 \u2192 2.8.0breaking

    Add support for programmatic title generation by @NeevCohen in [#9183](https://github.com/pydantic/pydantic/pull/9183)

  • 2.8.0 \u2192 2.8.0breaking

    Implement `fail_fast` feature by @uriyyo in [#9708](https://github.com/pydantic/pydantic/pull/9708)

  • 2.8.0 \u2192 2.8.0breaking

    Add `ser_json_inf_nan='strings'` mode to produce valid JSON by @josh-newman in [pydantic/pydantic-core#1307](https://github.com/pydantic/pydantic-core/pull/1307)

  • 2.8.0 \u2192 2.8.0breaking

    Add warning when "alias" is set in ignored `Annotated` field by @nix010 in [#9170](https://github.com/pydantic/pydantic/pull/9170)

  • 2.8.0 \u2192 2.8.0breaking

    Relax type specification for `__validators__` values in `create_model` by @sydney-runkle in [#9697](https://github.com/pydantic/pydantic/pull/9697)

  • 2.8.0 \u2192 2.8.0breaking

    **Breaking Change:** Improve `smart` union matching logic by @sydney-runkle in [pydantic/pydantic-core#1322](https://github.com/pydantic/pydantic-core/pull/1322)

  • 2.8.0 \u2192 2.8.0breaking

    ⚡️ Speed up `_display_error_loc()` by 25% in `pydantic/v1/error_wrappers.py` by @misrasaurabh1 in [#9653](https://github.com/pydantic/pydantic/pull/9653)

  • 2.8.0 \u2192 2.8.0breaking

    ⚡️ Speed up `_get_all_json_refs()` by 34% in `pydantic/json_schema.py` by @misrasaurabh1 in [#9650](https://github.com/pydantic/pydantic/pull/9650)

  • 2.8.0 \u2192 2.8.0breaking

    ⚡️ Speed up `is_pydantic_dataclass()` by 41% in `pydantic/dataclasses.py` by @misrasaurabh1 in [#9652](https://github.com/pydantic/pydantic/pull/9652)

  • 2.8.0 \u2192 2.8.0breaking

    ⚡️ Speed up `to_snake()` by 27% in `pydantic/alias_generators.py` by @misrasaurabh1 in [#9747](https://github.com/pydantic/pydantic/pull/9747)

  • 2.8.0 \u2192 2.8.0breaking

    ⚡️ Speed up `unwrap_wrapped_function()` by 93% in `pydantic/_internal/_decorators.py` by @misrasaurabh1 in [#9727](https://github.com/pydantic/pydantic/pull/9727)

  • 2.8.0 \u2192 2.8.0breaking

    Replace `__spec__.parent` with `__package__` by @hramezani in [#9331](https://github.com/pydantic/pydantic/pull/9331)

  • 2.8.0 \u2192 2.8.0breaking

    Fix Outputted Model JSON Schema for `Sequence` type by @anesmemisevic in [#9303](https://github.com/pydantic/pydantic/pull/9303)

  • 2.8.0 \u2192 2.8.0deprecated

    Implement `deprecated` field in json schema by @NeevCohen in [#9298](https://github.com/pydantic/pydantic/pull/9298)

  • 2.7.0 \u2192 2.7.0api

    Update `warnings` parameter for serialization utilities to allow raising a warning by @Lance-Drane in [#9166](https://github.com/pydantic/pydantic/pull/9166)

  • 2.7.0 \u2192 2.7.0behavior

    Correct docs, logic for `model_construct` behavior with `extra` by @sydney-runkle in [#8807](https://github.com/pydantic/pydantic/pull/8807)

  • 2.7.0 \u2192 2.7.0breaking

    Improve error message for improper `RootModel` subclasses by @sydney-runkle in [#8857](https://github.com/pydantic/pydantic/pull/8857)

  • 2.7.0 \u2192 2.7.0breaking

    Add support for field level number to str coercion option by @NeevCohen in [#9137](https://github.com/pydantic/pydantic/pull/9137)

  • 2.7.0 \u2192 2.7.0breaking

    Add generic `Secret` base type by @conradogarciaberrotaran in [#8519](https://github.com/pydantic/pydantic/pull/8519)

  • 2.7.0 \u2192 2.7.0breaking

    **Breaking Change:** Use `PEP570` syntax by @Viicos in [#8940](https://github.com/pydantic/pydantic/pull/8940)

  • 2.7.0 \u2192 2.7.0breaking

    Support for parsing partial JSON strings in Python by @samuelcolvin in [pydantic/jiter#66](https://github.com/pydantic/jiter/pull/66)

  • 2.7.0 \u2192 2.7.0breaking

    Add environment variable to disable plugins by @geospackle in [#8767](https://github.com/pydantic/pydantic/pull/8767)

  • 2.7.0 \u2192 2.7.0breaking

    Make use of `Sphinx` inventories for cross references in docs by @Viicos in [#8682](https://github.com/pydantic/pydantic/pull/8682)

  • 2.7.0 \u2192 2.7.0breaking

    Adopt `jiter` `v0.2.0` by @samuelcolvin in [pydantic/pydantic-core#1250](https://github.com/pydantic/pydantic-core/pull/1250)

  • 2.7.0 \u2192 2.7.0breaking

    Reorganize `pyproject.toml` sections by @Viicos in [#8899](https://github.com/pydantic/pydantic/pull/8899)

  • 2.7.0 \u2192 2.7.0breaking

    Add a `with_config` decorator to comply with typing spec by @Viicos in [#8611](https://github.com/pydantic/pydantic/pull/8611)

  • 2.7.0 \u2192 2.7.0breaking

    Bump `pydantic-core` to `v2.18.1` by @sydney-runkle in [#9211](https://github.com/pydantic/pydantic/pull/9211)

  • 2.7.0 \u2192 2.7.0breaking

    Extract attribute docstrings from `FieldInfo.description` by @Viicos in [#6563](https://github.com/pydantic/pydantic/pull/6563)

  • 2.7.0 \u2192 2.7.0breaking

    Allow an optional separator splitting the value and unit of the result of `ByteSize.human_readable` by @jks15satoshi in [#8706](https://github.com/pydantic/pydantic/pull/8706)

  • 2.7.0 \u2192 2.7.0breaking

    Add feedback widget to docs with flarelytics integration by @sydney-runkle in [#9129](https://github.com/pydantic/pydantic/pull/9129)

  • 2.7.0 \u2192 2.7.0breaking

    Ability to pass `context` to serialization by @ornariece in [#8965](https://github.com/pydantic/pydantic/pull/8965)

  • 2.7.0 \u2192 2.7.0breaking

    Add support for `typing.Self` by @Youssefares in [#9023](https://github.com/pydantic/pydantic/pull/9023)

  • 2.7.0 \u2192 2.7.0breaking

    Support for `serialize_as_any` runtime setting by @sydney-runkle in [#8830](https://github.com/pydantic/pydantic/pull/8830)

  • 2.7.0 \u2192 2.7.0breaking

    Add support for `re.Pattern[str]` to `pattern` field by @jag-k in [#9053](https://github.com/pydantic/pydantic/pull/9053)

  • 2.7.0 \u2192 2.7.0breaking

    Add `ClickhouseDsn` support by @solidguy7 in [#9062](https://github.com/pydantic/pydantic/pull/9062)

  • 2.7.0 \u2192 2.7.0breaking

    Update `create_model()` to support `typing.Annotated` as input by @wannieman98 in [#8947](https://github.com/pydantic/pydantic/pull/8947)

  • 2.7.0 \u2192 2.7.0breaking

    Handle a case when `model_config` is defined as a model property by @alexeyt101 in [#9004](https://github.com/pydantic/pydantic/pull/9004)

  • 2.7.0 \u2192 2.7.0breaking

    Allow `field_serializer('*')` by @ornariece in [#9001](https://github.com/pydantic/pydantic/pull/9001)

  • 2.7.0 \u2192 2.7.0deprecated

    Add support for `deprecated` fields by @Viicos in [#8237](https://github.com/pydantic/pydantic/pull/8237)

  • 2.13.0 \u2192 2.13.0api

    Change type of `Any` when synthesizing `_build_sources` for `BaseSettings.__init__()` signature in the mypy plugin by @Viicos in [#13049](https://github.com/pydantic/pydantic/pull/13049)

  • 2.13.0 \u2192 2.13.0behavior

    Allow default factories of private attributes to take validated model data by @Viicos in [#13013](https://github.com/pydantic/pydantic/pull/13013)

  • 2.13.0 \u2192 2.13.0breaking

    Update jiter to v0.14.0 to fix a segmentation fault on musl Linux by @Viicos in [#13064](https://github.com/pydantic/pydantic/pull/13064)

  • 2.13.0 \u2192 2.13.0breaking

    Warn when serializing fixed length tuples with too few items by @arvindsaripalli in [#13016](https://github.com/pydantic/pydantic/pull/13016)

  • 2.13.0 \u2192 2.13.0breaking

    Fix model equality when using runtime `extra` configuration by @Viicos in [#13062](https://github.com/pydantic/pydantic/pull/13062)

  • 2.13.0 \u2192 2.13.0breaking

    Add zizmor for GitHub Actions workflow linting by @Viicos in [#13039](https://github.com/pydantic/pydantic/pull/13039)

  • 2.13.0 \u2192 2.13.0breaking

    @arvindsaripalli made their first contribution in [#13016](https://github.com/pydantic/pydantic/pull/13016)

  • 2.12.0 \u2192 2.12.0api

    Use `Any` as context annotation in plugin API by @Viicos in [#12341](https://github.com/pydantic/pydantic/pull/12341)

  • 2.12.0 \u2192 2.12.0api

    Add `__qualname__` parameter for `create_model` by @Atry in [#12001](https://github.com/pydantic/pydantic/pull/12001)

  • 2.12.0 \u2192 2.12.0api

    Add `union_format` parameter to JSON Schema generation by @Viicos in [#12147](https://github.com/pydantic/pydantic/pull/12147)

  • 2.12.0 \u2192 2.12.0api

    Do not try to infer name from lambda definitions in pipelines API by @Viicos in [#12289](https://github.com/pydantic/pydantic/pull/12289)

  • 2.12.0 \u2192 2.12.0api

    Add `extra` parameter to the validate functions by @anvilpete in [#12233](https://github.com/pydantic/pydantic/pull/12233)

  • 2.12.0 \u2192 2.12.0breaking

    @inducer made their first contribution in [#12279](https://github.com/pydantic/pydantic/pull/12279)

  • 2.12.0 \u2192 2.12.0breaking

    Expose `FieldInfo` in `pydantic.fields.__all__` by @Viicos in [#12339](https://github.com/pydantic/pydantic/pull/12339)

  • 2.12.0 \u2192 2.12.0breaking

    Use proper `stacklevel` in warnings when possible by @Viicos in [#12342](https://github.com/pydantic/pydantic/pull/12342)

  • 2.12.0 \u2192 2.12.0breaking

    Update V1 copy to v1.10.24 by @Viicos in [#12338](https://github.com/pydantic/pydantic/pull/12338)

  • 2.12.0 \u2192 2.12.0breaking

    @anvilpete made their first contribution in [#12233](https://github.com/pydantic/pydantic/pull/12233)

  • 2.12.0 \u2192 2.12.0breaking

    @JonathanWindell made their first contribution in [#12327](https://github.com/pydantic/pydantic/pull/12327)

  • 2.12.0 \u2192 2.12.0breaking

    Add `preverse_empty_path` URL options by @Viicos in [#12336](https://github.com/pydantic/pydantic/pull/12336)

  • 2.12.0 \u2192 2.12.0breaking

    @Atry made their first contribution in [#12001](https://github.com/pydantic/pydantic/pull/12001)

  • 2.12.0 \u2192 2.12.0breaking

    Use proper namespace for functions in `TypeAdapter` by @Viicos in [#12324](https://github.com/pydantic/pydantic/pull/12324)

  • 2.12.0 \u2192 2.12.0breaking

    Use `Any` for context type annotation in `TypeAdapter` by @inducer in [#12279](https://github.com/pydantic/pydantic/pull/12279)

  • 2.12.0 \u2192 2.12.0breaking

    Respect `validation_alias` in `@validate_call` by @Viicos in [#12340](https://github.com/pydantic/pydantic/pull/12340)

  • 2.12.0 \u2192 2.12.0breaking

    Add `exclude_computed_fields` serialization option by @Viicos in [#12334](https://github.com/pydantic/pydantic/pull/12334)

  • 2.11.0 \u2192 2.11.0api

    Improve alias configuration APIs by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11468

  • 2.11.0 \u2192 2.11.0behavior

    Add a `default_factory_takes_validated_data` property to `FieldInfo` by @Viicos in https://github.com/pydantic/pydantic/pull/11034

  • 2.11.0 \u2192 2.11.0behavior

    Infer final fields with a default value as class variables in the mypy plugin by @Viicos in https://github.com/pydantic/pydantic/pull/11121

  • 2.11.0 \u2192 2.11.0behavior

    Properly support type variable defaults by @Viicos in https://github.com/pydantic/pydantic/pull/11332

  • 2.11.0 \u2192 2.11.0behavior

    Support unsubstituted type variables with both a default and a bound or constraints by @FyZzyss in https://github.com/pydantic/pydantic/pull/10789

  • 2.11.0 \u2192 2.11.0breaking

    Use the correct frame when instantiating a parametrized `TypeAdapter` by @Viicos in https://github.com/pydantic/pydantic/pull/10893

  • 2.11.0 \u2192 2.11.0breaking

    Optimize calls to `get_type_ref` by @Viicos in https://github.com/pydantic/pydantic/pull/10863

  • 2.11.0 \u2192 2.11.0breaking

    Raise a better error when a generic alias is used inside `type[]` by @Viicos in https://github.com/pydantic/pydantic/pull/11088

  • 2.11.0 \u2192 2.11.0breaking

    Properly support PEP 695 generics syntax by @Viicos in https://github.com/pydantic/pydantic/pull/11189

  • 2.11.0 \u2192 2.11.0breaking

    Add support for validating v6, v7, v8 UUIDs by @astei in https://github.com/pydantic/pydantic/pull/11436

  • 2.11.0 \u2192 2.11.0breaking

    Rework `create_model` field definitions format by @Viicos in https://github.com/pydantic/pydantic/pull/11032

  • 2.11.0 \u2192 2.11.0breaking

    **Breaking Change:** Move core schema generation logic for path types inside the `GenerateSchema` class by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10846

  • 2.11.0 \u2192 2.11.0breaking

    Disable `pydantic-core` core schema validation by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11271

  • 2.11.0 \u2192 2.11.0breaking

    Only evaluate `FieldInfo` annotations if required during schema building by @Viicos in https://github.com/pydantic/pydantic/pull/10769

  • 2.11.0 \u2192 2.11.0breaking

    Improve `__setattr__` performance of Pydantic models by caching setter functions by @MarkusSintonen in https://github.com/pydantic/pydantic/pull/10868

  • 2.11.0 \u2192 2.11.0breaking

    Improve annotation application performance by @Viicos in https://github.com/pydantic/pydantic/pull/11186

  • 2.11.0 \u2192 2.11.0breaking

    Improve performance of `_typing_extra` module by @Viicos in https://github.com/pydantic/pydantic/pull/11255

  • 2.11.0 \u2192 2.11.0breaking

    Refactor and optimize schema cleaning logic by @Viicos in https://github.com/pydantic/pydantic/pull/11244

  • 2.11.0 \u2192 2.11.0breaking

    Create a single dictionary when creating a `CoreConfig` instance by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11384

  • 2.11.0 \u2192 2.11.0breaking

    Bump `pydantic-core` and thus use `SchemaValidator` and `SchemaSerializer` caching by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11402

  • 2.11.0 \u2192 2.11.0breaking

    Reuse cached core schemas for parametrized generic Pydantic models by @MarkusSintonen in https://github.com/pydantic/pydantic/pull/11434

  • 2.11.0 \u2192 2.11.0breaking

    Improve `TypeAdapter` instance repr by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10872

  • 2.11.0 \u2192 2.11.0deprecated

    Raise a deprecation warning when a field is annotated as final with a default value by @Viicos in https://github.com/pydantic/pydantic/pull/11168

  • 2.11.0 \u2192 2.11.0deprecated

    Deprecate accessing `model_fields` and `model_computed_fields` on instances by @Viicos in https://github.com/pydantic/pydantic/pull/11169

  • 2.11.0 \u2192 2.11.0removed

    Remove Python 3.8 Support by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11258

  • 1 \u2192 2api

    Core rewritten in Rust (pydantic-core). Up to 100x faster. Many API methods renamed.

    Migration

    `obj.dict()` -> `obj.model_dump()`; `obj.json()` -> `obj.model_dump_json()`; `parse_obj` -> `model_validate`; `parse_raw` -> `model_validate_json`.

  • 1 \u2192 2api

    `@validator` -> `@field_validator` (and must be classmethod). `@root_validator` -> `@model_validator`.

    Migration

    Use `bump-pydantic` migration tool: `pip install bump-pydantic && bump-pydantic <path>`.

  • 1 \u2192 2config

    `class Config:` replaced by `model_config: ConfigDict = ConfigDict(...)`.

    Migration

    `class Config: extra = 'forbid'` becomes `model_config = ConfigDict(extra='forbid')`.

  • 1.9.1 \u2192 1.9.2breaking

    Allow for shallow copies of model fields, `Config.copy_on_model_validation` is now a str which must be

  • 1.9.0 \u2192 1.9.1api

    Limit the size of `generics._generic_types_cache` and `generics._assigned_parameters`

  • 1.9.0 \u2192 1.9.1breaking

    Add support for autocomplete in VS Code via `__dataclass_transform__` when using `pydantic.dataclasses.dataclass`, [#4006](https://github.com/pydantic/pydantic/pull/4006) by @giuliano-oliveira

  • 1.9.0 \u2192 1.9.1breaking

    Fix in-place modification of `FieldInfo` that caused problems with PEP 593 type aliases, [#4067](https://github.com/pydantic/pydantic/pull/4067) by @adriangb

  • 1.9.0 \u2192 1.9.1breaking

    Speedup `__isinstancecheck__` on pydantic models when the type is not a model, may also avoid memory "leaks", [#4081](https://github.com/pydantic/pydantic/pull/4081) by @samuelcolvin

  • 1.9.0 \u2192 1.9.1breaking

    Add Jupyverse and FPS as Jupyter projects using pydantic, [#4082](https://github.com/pydantic/pydantic/pull/4082) by @davidbrochart

  • 1.9.0 \u2192 1.9.1breaking

    Fix JSON Schema generation for Discriminated Unions within lists, [#3608](https://github.com/pydantic/pydantic/pull/3608) by @samuelcolvin

  • 1.9.0 \u2192 1.9.1breaking

    Add `read_text(encoding='utf-8')` for `setup.py`, [#3625](https://github.com/pydantic/pydantic/pull/3625) by @hswong3i

  • 1.9.0 \u2192 1.9.1breaking

    fix: clarify that discriminated unions do not support singletons, [#3636](https://github.com/pydantic/pydantic/pull/3636) by @tommilligan

  • 1.9.0 \u2192 1.9.1breaking

    `Config.copy_on_model_validation` does a deep copy and not a shallow one, [#3641](https://github.com/pydantic/pydantic/pull/3641) by @PrettyWood

  • 1.9.0 \u2192 1.9.1breaking

    Include non-standard port numbers in rendered URLs, [#3652](https://github.com/pydantic/pydantic/pull/3652) by @dolfinus

  • 1.9.0 \u2192 1.9.1breaking

    **Breaking Change, see [#4106](https://github.com/pydantic/pydantic/pull/4106)**: Fix issue with self-referencing dataclass, [#3675](https://github.com/pydantic/pydantic/pull/3675) by @uriyyo

  • 1.9.0 \u2192 1.9.1breaking

    Allow self referencing `ClassVar`s in models, [#3679](https://github.com/pydantic/pydantic/pull/3679) by @samuelcolvin

  • 1.9.0 \u2192 1.9.1breaking

    Fixed "error checking inheritance of" when using PEP585 and PEP604 type hints, [#3681](https://github.com/pydantic/pydantic/pull/3681) by @aleksul

  • 1.9.0 \u2192 1.9.1breaking

    Prevent subclasses of bytes being converted to bytes, [#3706](https://github.com/pydantic/pydantic/pull/3706) by @samuelcolvin

  • 1.9.0 \u2192 1.9.1breaking

    Update documentation about lazy evaluation of sources for Settings, [#3806](https://github.com/pydantic/pydantic/pull/3806) by @garyd203

  • 1.9.0 \u2192 1.9.1breaking

    Fix nested Python dataclass schema regression, [#3819](https://github.com/pydantic/pydantic/pull/3819) by @himbeles

  • 1.9.0 \u2192 1.9.1breaking

    Typing checking with pyright in CI, improve docs on vscode/pylance/pyright, [#3972](https://github.com/pydantic/pydantic/pull/3972) by @samuelcolvin

  • 1.9.0 \u2192 1.9.1removed

    Remove benchmarks from codebase and docs, [#3973](https://github.com/pydantic/pydantic/pull/3973) by @samuelcolvin

  • 1.8.2 \u2192 1.9.0api

    fix `validate_arguments` issue with `Config.validate_all`, [#3135](https://github.com/pydantic/pydantic/pull/3135) by @PrettyWood

  • 1.8.2 \u2192 1.9.0api

    `validate_arguments` now supports `extra` customization (used to always be `Extra.forbid`), [#3161](https://github.com/pydantic/pydantic/pull/3161) by @PrettyWood

  • 1.8.2 \u2192 1.9.0api

    When generating field schema, pass optional `field` argument (of type

  • 1.8.2 \u2192 1.9.0behavior

    Always use `Enum` value as default in generated JSON schema, [#3190](https://github.com/pydantic/pydantic/pull/3190) by @joaommartins

  • 1.8.2 \u2192 1.9.0behavior

    Fix support for using a subclass of an annotation as a default, [#3018](https://github.com/pydantic/pydantic/pull/3018) by @JacobHayes

  • 1.8.2 \u2192 1.9.0breaking

    make `create_model_from_typeddict` mypy compliant, [#3008](https://github.com/pydantic/pydantic/pull/3008) by @PrettyWood

  • 1.8.2 \u2192 1.9.0breaking

    Add support for `Decimal`-specific validation configurations in `Field()`, additionally to using `condecimal()`,

  • 1.8.2 \u2192 1.9.0breaking

    Add `arm64` binaries suitable for MacOS with an M1 CPU to PyPI, [#3498](https://github.com/pydantic/pydantic/pull/3498) by @samuelcolvin

  • 1.8.2 \u2192 1.9.0breaking

    Fix issue where `None` was considered invalid when using a `Union` type containing `Any` or `object`, [#3444](https://github.com/pydantic/pydantic/pull/3444) by @tharradine

  • 1.8.2 \u2192 1.9.0breaking

    Fix issue when pydantic fail to parse `typing.ClassVar` string type annotation, [#3401](https://github.com/pydantic/pydantic/pull/3401) by @uriyyo

  • 1.8.2 \u2192 1.9.0breaking

    Mention Python >= 3.9.2 as an alternative to `typing_extensions.TypedDict`, [#3374](https://github.com/pydantic/pydantic/pull/3374) by @BvB93

  • 1.8.2 \u2192 1.9.0breaking

    Changed the validator method name in the [Custom Errors example](https://docs.pydantic.dev/usage/models/#custom-errors)

  • 1.8.2 \u2192 1.9.0breaking

    Add `AmqpDsn` class, [#3254](https://github.com/pydantic/pydantic/pull/3254) by @kludex

  • 1.8.2 \u2192 1.9.0breaking

    Add support for Mypy 0.920, [#3175](https://github.com/pydantic/pydantic/pull/3175) by @christianbundy

  • 1.8.2 \u2192 1.9.0breaking

    Complex types can be set by nested environment variables, [#3159](https://github.com/pydantic/pydantic/pull/3159) by @Air-Mark

  • 1.8.2 \u2192 1.9.0breaking

    Fix mypy plugin to collect fields based on `pydantic.utils.is_valid_field` so that it ignores untyped private variables, [#3146](https://github.com/pydantic/pydantic/pull/3146) by @hi-ogawa

  • 1.8.2 \u2192 1.9.0breaking

    avoid dict coercion when using dict subclasses as field type, [#3122](https://github.com/pydantic/pydantic/pull/3122) by @PrettyWood

  • 1.8.2 \u2192 1.9.0breaking

    add support for `object` type, [#3062](https://github.com/pydantic/pydantic/pull/3062) by @PrettyWood

  • 1.8.2 \u2192 1.9.0breaking

    Updates pydantic dataclasses to keep `_special` properties on parent classes, [#3043](https://github.com/pydantic/pydantic/pull/3043) by @zulrang

  • 1.8.2 \u2192 1.9.0breaking

    Add a `TypedDict` class for error objects, [#3038](https://github.com/pydantic/pydantic/pull/3038) by @matthewhughes934

  • 1.8.2 \u2192 1.9.0breaking

    Make multiple inheritance work when using `PrivateAttr`, [#2989](https://github.com/pydantic/pydantic/pull/2989) by @hmvp

  • 1.8.2 \u2192 1.9.0breaking

    Parse environment variables as JSON, if they have a `Union` type with a complex subfield, [#2936](https://github.com/pydantic/pydantic/pull/2936) by @cbartz

  • 1.8.2 \u2192 1.9.0breaking

    Prevent `StrictStr` permitting `Enum` values where the enum inherits from `str`, [#2929](https://github.com/pydantic/pydantic/pull/2929) by @samuelcolvin

  • 1.8.2 \u2192 1.9.0breaking

    Make `SecretsSettingsSource` parse values being assigned to fields of complex types when sourced from a secrets file,

  • 1.8.2 \u2192 1.9.0breaking

    add a dark mode to *pydantic* documentation, [#2913](https://github.com/pydantic/pydantic/pull/2913) by @gbdlin

  • 1.7.4 \u2192 1.8api

    [`frozen` parameter on `Config`](https://docs.pydantic.dev/usage/model_config/) to allow models to be hashed, [#1880](https://github.com/pydantic/pydantic/pull/1880) by @rhuille

  • 1.7.4 \u2192 1.8breaking

    Update docs extensions to fix local syntax highlighting, [#2400](https://github.com/pydantic/pydantic/pull/2400) by @daviskirk

  • 1.7.4 \u2192 1.8breaking

    fix: allow `utils.lenient_issubclass` to handle `typing.GenericAlias` objects like `list[str]` in Python >= 3.9, [#2399](https://github.com/pydantic/pydantic/pull/2399) by @daviskirk

  • 1.7.4 \u2192 1.8breaking

    Improve field declaration for *pydantic* `dataclass` by allowing the usage of *pydantic* `Field` or `'metadata'` kwarg of `dataclasses.field`, [#2384](https://github.com/pydantic/pydantic/pull/2384) by @PrettyWood

  • 1.7.4 \u2192 1.8breaking

    Making `typing-extensions` a required dependency, [#2368](https://github.com/pydantic/pydantic/pull/2368) by @samuelcolvin

  • 1.7.4 \u2192 1.8breaking

    Make `resolve_annotations` more lenient, allowing for missing modules, [#2363](https://github.com/pydantic/pydantic/pull/2363) by @samuelcolvin

  • 1.7.4 \u2192 1.8breaking

    Allow configuring models through class kwargs, [#2356](https://github.com/pydantic/pydantic/pull/2356) by @Bobronium

  • 1.7.4 \u2192 1.8breaking

    Prevent `Mapping` subclasses from always being coerced to `dict`, [#2325](https://github.com/pydantic/pydantic/pull/2325) by @ofek

  • 1.7.4 \u2192 1.8breaking

    Support empty tuple type, [#2318](https://github.com/pydantic/pydantic/pull/2318) by @PrettyWood

  • 1.7.4 \u2192 1.8breaking

    Support [`Annotated` hints on model fields](https://docs.pydantic.dev/usage/schema/#typingannotated-fields), [#2147](https://github.com/pydantic/pydantic/pull/2147) by @JacobHayes

  • 1.7.4 \u2192 1.8breaking

    Properly encode `Decimal` with, or without any decimal places, [#2293](https://github.com/pydantic/pydantic/pull/2293) by @hultner

  • 1.7.4 \u2192 1.8breaking

    fix: update `__fields_set__` in `BaseModel.copy(update=…)`, [#2290](https://github.com/pydantic/pydantic/pull/2290) by @PrettyWood

  • 1.7.4 \u2192 1.8breaking

    fix: `python_requires` metadata to require >=3.6.1, [#2306](https://github.com/pydantic/pydantic/pull/2306) by @hukkinj1

  • 1.7.4 \u2192 1.8breaking

    fix: allow `None` for type `Optional[conset / conlist]`, [#2320](https://github.com/pydantic/pydantic/pull/2320) by @PrettyWood

  • 1.7.4 \u2192 1.8breaking

    [Hypothesis plugin](https://docs.pydantic.dev/hypothesis_plugin/) for testing, [#2097](https://github.com/pydantic/pydantic/pull/2097) by @Zac-HD

  • 1.7.4 \u2192 1.8breaking

    **Breaking Change:** always validate only first sublevel items with `each_item`.

  • 1.7.4 \u2192 1.8breaking

    support for [`NamedTuple` and `TypedDict`](https://docs.pydantic.dev/usage/types/#annotated-types), [#2216](https://github.com/pydantic/pydantic/pull/2216) by @PrettyWood

  • 1.7.4 \u2192 1.8removed

    remove `model.fields` which was replaced by `model.__fields__`

  • 1.7.4 \u2192 1.8removed

    **Breaking Change**, remove old deprecation aliases from v1, [#2415](https://github.com/pydantic/pydantic/pull/2415) by @samuelcolvin:

  • 1.7.4 \u2192 1.8removed

    remove notes on migrating to v1 in docs

  • 1.7.4 \u2192 1.8removed

    remove `Schema` which was replaced by `Field`

  • 1.7.4 \u2192 1.8removed

    remove `Config.case_insensitive` which was replaced by `Config.case_sensitive` (default `False`)

  • 1.7.4 \u2192 1.8removed

    remove `Config.allow_population_by_alias` which was replaced by `Config.allow_population_by_field_name`

  • 1.7.4 \u2192 1.8removed

    remove `model.to_string()` which was replaced by `str(model)`

  • 1.7.4 \u2192 1.8removed

    remove `model.__values__` which was replaced by `model.__dict__`

  • 1.6.2 \u2192 1.7api

    Call validator with the correct `values` parameter type in `BaseModel.__setattr__`,

  • 1.6.2 \u2192 1.7api

    Allows subclasses of generic models to make some, or all, of the superclass's type parameters concrete, while

  • 1.6.2 \u2192 1.7api

    Clarify documentation for `parse_file` to show that the argument

  • 1.6.2 \u2192 1.7behavior

    Support custom title, description and default in schema of enums, [#1748](https://github.com/pydantic/pydantic/pull/1748) by @PrettyWood

  • 1.6.2 \u2192 1.7breaking

    Support home directory relative paths for `dotenv` files (e.g. `~/.env`), [#1803](https://github.com/pydantic/pydantic/pull/1803) by @PrettyWood

  • 1.6.2 \u2192 1.7breaking

    Python 3.9 support, thanks @PrettyWood

  • 1.6.2 \u2192 1.7breaking

    [Private model attributes](https://docs.pydantic.dev/usage/models/#private-model-attributes), thanks @Bobronium

  • 1.6.2 \u2192 1.7breaking

    ["secrets files" support in `BaseSettings`](https://docs.pydantic.dev/usage/settings/#secret-support), thanks @mdgilene

  • 1.6.2 \u2192 1.7breaking

    [convert stdlib dataclasses to pydantic dataclasses and use stdlib dataclasses in models](https://docs.pydantic.dev/usage/dataclasses/#stdlib-dataclasses-and-pydantic-dataclasses), thanks @PrettyWood

  • 1.6.2 \u2192 1.7breaking

    Rearrange CI to run linting as a separate job, split install recipes for different tasks, [#2020](https://github.com/pydantic/pydantic/pull/2020) by @samuelcolvin

  • 1.6.2 \u2192 1.7breaking

    Force `fields.Undefined` to be a singleton object, fixing inherited generic model schemas, [#1981](https://github.com/pydantic/pydantic/pull/1981) by @daviskirk

  • 1.6.2 \u2192 1.7breaking

    Include tests in source distributions, [#1976](https://github.com/pydantic/pydantic/pull/1976) by @sbraz

  • 1.6.2 \u2192 1.7breaking

    Add ability to use `min_length/max_length` constraints with secret types, [#1974](https://github.com/pydantic/pydantic/pull/1974) by @uriyyo

  • 1.6.2 \u2192 1.7breaking

    Also check `root_validators` when `validate_assignment` is on, [#1971](https://github.com/pydantic/pydantic/pull/1971) by @PrettyWood

  • 1.6.2 \u2192 1.7breaking

    Fix const validators not running when custom validators are present, [#1957](https://github.com/pydantic/pydantic/pull/1957) by @hmvp

  • 1.6.2 \u2192 1.7breaking

    add `deque` to field types, [#1935](https://github.com/pydantic/pydantic/pull/1935) by @wozniakty

  • 1.6.2 \u2192 1.7breaking

    add basic support for Python 3.9, [#1832](https://github.com/pydantic/pydantic/pull/1832) by @PrettyWood

  • 1.6.2 \u2192 1.7breaking

    Fix typo in the anchor of exporting_models.md#modelcopy and incorrect description, [#1821](https://github.com/pydantic/pydantic/pull/1821) by @KimMachineGun

  • 1.6.2 \u2192 1.7breaking

    Added ability for `BaseSettings` to read "secret files", [#1820](https://github.com/pydantic/pydantic/pull/1820) by @mdgilene

  • 1.6.2 \u2192 1.7breaking

    add `parse_raw_as` utility function, [#1812](https://github.com/pydantic/pydantic/pull/1812) by @PrettyWood

  • 1.6.2 \u2192 1.7breaking

    Fix false positive from mypy plugin when a class nested within a `BaseModel` is named `Model`, [#1770](https://github.com/pydantic/pydantic/pull/1770) by @selimb

  • 1.6.2 \u2192 1.7breaking

    add basic support of Pattern type in schema generation, [#1767](https://github.com/pydantic/pydantic/pull/1767) by @PrettyWood

  • 1.6.2 \u2192 1.7breaking

    Properly represent `Literal` Enums when `use_enum_values` is True, [#1747](https://github.com/pydantic/pydantic/pull/1747) by @noelevans

  • 1.6.2 \u2192 1.7breaking

    Allows timezone information to be added to strings to be formatted as time objects. Permitted formats are `Z` for UTC

  • 1.6.2 \u2192 1.7removed

    **Breaking Change:** remove `__field_defaults__`, add `default_factory` support with `BaseModel.construct`.

  • 1.3 \u2192 1.4api

    Fix `cls` argument in validators during assignment, [#1172](https://github.com/pydantic/pydantic/pull/1172) by @samuelcolvin

  • 1.3 \u2192 1.4breaking

    Fix regex for username and password in URLs, [#1115](https://github.com/pydantic/pydantic/pull/1115) by @samuelcolvin

  • 1.3 \u2192 1.4breaking

    Add support for nested generic models, [#1104](https://github.com/pydantic/pydantic/pull/1104) by @dmontagu

  • 1.3 \u2192 1.4breaking

    add `__all__` to `__init__.py` to prevent "implicit reexport" errors from mypy, [#1072](https://github.com/pydantic/pydantic/pull/1072) by @samuelcolvin

  • 1.3 \u2192 1.4breaking

    Add support for using "dotenv" files with `BaseSettings`, [#1011](https://github.com/pydantic/pydantic/pull/1011) by @acnebs

  • 1.3 \u2192 1.4breaking

    Fix `EmailStr` and `NameEmail` to accept instances of themselves in cython, [#1126](https://github.com/pydantic/pydantic/pull/1126) by @koxudaxi

  • 1.3 \u2192 1.4breaking

    Pass model class to the `Config.schema_extra` callable, [#1125](https://github.com/pydantic/pydantic/pull/1125) by @therefromhere

  • 1.3 \u2192 1.4breaking

    **Breaking Change:** alias precedence logic changed so aliases on a field always take priority over

  • 1.3 \u2192 1.4breaking

    Add support for unicode and punycode in TLDs, [#1182](https://github.com/pydantic/pydantic/pull/1182) by @jamescurtin

  • 1.3 \u2192 1.4breaking

    completing Luhn algorithm for `PaymentCardNumber`, [#1166](https://github.com/pydantic/pydantic/pull/1166) by @cuencandres

  • 1.3 \u2192 1.4breaking

    add support for generics that implement `__get_validators__` like a custom data type, [#1159](https://github.com/pydantic/pydantic/pull/1159) by @tiangolo

  • 1.3 \u2192 1.4breaking

    add support for infinite generators with `Iterable`, [#1152](https://github.com/pydantic/pydantic/pull/1152) by @tiangolo

  • 1.3 \u2192 1.4breaking

    fix `url_regex` to accept schemas with `+`, `-` and `.` after the first character, [#1142](https://github.com/pydantic/pydantic/pull/1142) by @samuelcolvin

  • 1.3 \u2192 1.4breaking

    move `version_info()` to `version.py`, suggest its use in issues, [#1138](https://github.com/pydantic/pydantic/pull/1138) by @samuelcolvin

  • 1.3 \u2192 1.4breaking

    Improve pydantic import time by roughly 50% by deferring some module loading and regex compilation, [#1127](https://github.com/pydantic/pydantic/pull/1127) by @samuelcolvin

  • 1.1.1 \u2192 1.2api

    Add `allow_reuse` argument to validators, thus allowing validator reuse, [#940](https://github.com/pydantic/pydantic/pull/940) by @dmontagu

  • 1.1.1 \u2192 1.2behavior

    Add support for dataclasses default factory, [#968](https://github.com/pydantic/pydantic/pull/968) by @ahirner

  • 1.1.1 \u2192 1.2breaking

    Adds ByteSize conversion to another unit, [#995](https://github.com/pydantic/pydantic/pull/995) by @dgasmith

  • 1.1.1 \u2192 1.2breaking

    Fix `__str__` and `__repr__` inheritance for models, [#1022](https://github.com/pydantic/pydantic/pull/1022) by @samuelcolvin

  • 1.1.1 \u2192 1.2breaking

    Add support for `typing.Literal` for Python 3.8, [#1026](https://github.com/pydantic/pydantic/pull/1026) by @dmontagu

  • 1.1.1 \u2192 1.2breaking

    add testimonials section to docs, [#1025](https://github.com/pydantic/pydantic/pull/1025) by @sullivancolin

  • 1.1.1 \u2192 1.2breaking

    Add benchmarks for `cattrs`, [#513](https://github.com/pydantic/pydantic/pull/513) by @sebastianmika

  • 1.1.1 \u2192 1.2breaking

    Fix mypy complaint about `@root_validator(pre=True)`, [#984](https://github.com/pydantic/pydantic/pull/984) by @samuelcolvin

  • 1.1.1 \u2192 1.2breaking

    Add manylinux binaries for Python 3.8 to pypi, also support manylinux2010, [#994](https://github.com/pydantic/pydantic/pull/994) by @samuelcolvin

  • 1.1.1 \u2192 1.2breaking

    Add support for mapping types for custom root models, [#958](https://github.com/pydantic/pydantic/pull/958) by @dmontagu

  • 1.1.1 \u2192 1.2breaking

    Mypy plugin support for dataclasses, [#966](https://github.com/pydantic/pydantic/pull/966) by @koxudaxi

  • 1.1.1 \u2192 1.2breaking

    Add a `ByteSize` type for converting byte string (`1GB`) to plain bytes, [#977](https://github.com/pydantic/pydantic/pull/977) by @dgasmith

  • 1.1.1 \u2192 1.2breaking

    **Possible Breaking Change:** Add support for required `Optional` with `name: Optional[AnyType] = Field(...)`

  • 1.1.1 \u2192 1.2breaking

    Add `exclude_none` option to `dict()` and friends, [#587](https://github.com/pydantic/pydantic/pull/587) by @niknetniko

  • 1.1.1 \u2192 1.2breaking

    Add benchmarks for `valideer`, [#670](https://github.com/pydantic/pydantic/pull/670) by @gsakkis

  • 1.1.1 \u2192 1.2breaking

    Add `parse_obj_as` and `parse_file_as` functions for ad-hoc parsing of data into arbitrary pydantic-compatible types, [#934](https://github.com/pydantic/pydantic/pull/934) by @dmontagu

  • 1.10.0 \u2192 1.10.0api

    Now that `Config.extra` is supported, `dataclass` ignores by default extra arguments (like `BaseModel`)

  • 1.10.0 \u2192 1.10.0api

    Discriminated union models now use `oneOf` instead of `anyOf` when generating OpenAPI schema definitions, [#4335](https://github.com/pydantic/pydantic/pull/4335) by @MaxwellPayne

  • 1.10.0 \u2192 1.10.0api

    Fix `__post_init_post_parse__` is incorrectly passed keyword arguments when no `__post_init__` is defined, [#4361](https://github.com/pydantic/pydantic/pull/4361) by @hramezani

  • 1.10.0 \u2192 1.10.0breaking

    Allow empty string aliases by using a `alias is not None` check, rather than `bool(alias)`, [#4253](https://github.com/pydantic/pydantic/pull/4253) by @sergeytsaplin

  • 1.10.0 \u2192 1.10.0breaking

    Make `SecretStr` and `SecretBytes` hashable, [#4387](https://github.com/pydantic/pydantic/pull/4387) by @chbndrhnns

  • 1.10.0 \u2192 1.10.0breaking

    Fix `StrictBytes` does not raise `ValidationError` when `max_length` is present in `Field`, [#4380](https://github.com/pydantic/pydantic/pull/4380) by @JeanArhancet

  • 1.10.0 \u2192 1.10.0breaking

    Add support for bare `type`, [#4375](https://github.com/pydantic/pydantic/pull/4375) by @hramezani

  • 1.10.0 \u2192 1.10.0breaking

    Support Python 3.11, including binaries for 3.11 in PyPI, [#4374](https://github.com/pydantic/pydantic/pull/4374) by @samuelcolvin

  • 1.10.0 \u2192 1.10.0breaking

    Allow for custom parsing of environment variables via `parse_env_var` in `Config`, [#4406](https://github.com/pydantic/pydantic/pull/4406) by @acmiyaguchi

  • 1.10.0 \u2192 1.10.0breaking

    Fix PEP487 `__set_name__` protocol in `BaseModel` for PrivateAttrs, [#4407](https://github.com/pydantic/pydantic/pull/4407) by @tlambert03

  • 1.10.0 \u2192 1.10.0breaking

    Add support for `re.Pattern`, [#4366](https://github.com/pydantic/pydantic/pull/4366) by @hramezani

  • 1.10.0 \u2192 1.10.0breaking

    Fix implicitly importing `ForwardRef` and `Callable` from `pydantic.typing` instead of `typing` and also expose `MappingIntStrAny`, [#4358](https://github.com/pydantic/pydantic/pull/4358) by @aminalaee

  • 1.10.0 \u2192 1.10.0breaking

    moved repo to `pydantic/pydantic`, [#4348](https://github.com/pydantic/pydantic/pull/4348) by @yezz123

  • 1.10.0 \u2192 1.10.0breaking

    fix "extra fields not permitted" error when dataclass with `Extra.forbid` is validated multiple times, [#4343](https://github.com/pydantic/pydantic/pull/4343) by @detachhead

  • 1.10.0 \u2192 1.10.0breaking

    Add Python 3.9 and 3.10 examples to docs, [#4339](https://github.com/pydantic/pydantic/pull/4339) by @Bobronium

  • 1.10.0 \u2192 1.10.0breaking

    Allow type checkers to infer inner type of `Json` type. `Json[list[str]]` will be now inferred as `list[str]`,

  • 1.10.0 \u2192 1.10.0breaking

    Fix `StrictStr` does not raise `ValidationError` when `max_length` is present in `Field`, [#4388](https://github.com/pydantic/pydantic/pull/4388) by @hramezani

  • 1.10.0 \u2192 1.10.0breaking

    The `compiled` boolean (whether *pydantic* is compiled with cython) has been moved from `main.py` to `version.py`

  • 1.10.0 \u2192 1.10.0breaking

    Update `ForwardRef`s in `Field.outer_type_`, [#4249](https://github.com/pydantic/pydantic/pull/4249) by @JacobHayes

  • 1.10.0 \u2192 1.10.0breaking

    The use of `__dataclass_transform__` has been replaced by `typing_extensions.dataclass_transform`, which is the preferred way to mark pydantic models as a dataclass under [PEP 681](https://peps.python.org/pep-0681/), [#4241](https://github.com/pydantic/pydantic/pull/4241) by @multimeric

  • 1.10.0 \u2192 1.10.0breaking

    Refactor the whole *pydantic* `dataclass` decorator to really act like its standard lib equivalent.

  • 1.10.0 \u2192 1.10.0breaking

    Use parent model's `Config` when validating nested `NamedTuple` fields, [#4219](https://github.com/pydantic/pydantic/pull/4219) by @synek

  • 1.10.0 \u2192 1.10.0breaking

    Update `BaseModel.construct` to work with aliased Fields, [#4192](https://github.com/pydantic/pydantic/pull/4192) by @kylebamos

  • 1.10.0 \u2192 1.10.0removed

    remove `Any` types from the `dataclass` decorator so it can be used with the `disallow_any_expr` mypy option, [#4356](https://github.com/pydantic/pydantic/pull/4356) by @DetachHead

  • 1.10.0 \u2192 1.10.0renamed

    Rename `master` to `main`, [#4405](https://github.com/pydantic/pydantic/pull/4405) by @hramezani

  • 1.0 \u2192 1.0api

    Allow abstracts sets (eg. dict keys) in the `include` and `exclude` arguments of `dict()`, [#921](https://github.com/pydantic/pydantic/pull/921) by @samuelcolvin

  • 1.0 \u2192 1.0api

    Change the signature of `Model.construct()` to be more user-friendly, document `construct()` usage, [#898](https://github.com/pydantic/pydantic/pull/898) by @samuelcolvin

  • 1.0 \u2192 1.0api

    Fix `ConstrainedList`, update schema generation to reflect `min_items` and `max_items` `Field()` arguments, [#917](https://github.com/pydantic/pydantic/pull/917) by @samuelcolvin

  • 1.0 \u2192 1.0api

    Add `**kwargs` to `pydantic.main.ModelMetaclass.__new__` so `__init_subclass__` can take custom parameters on extended

  • 1.0 \u2192 1.0behavior

    Fix field of a type that has a default value, [#880](https://github.com/pydantic/pydantic/pull/880) by @koxudaxi

  • 1.0 \u2192 1.0breaking

    change secret types example, [#890](https://github.com/pydantic/pydantic/pull/890) by @ashears

  • 1.0 \u2192 1.0breaking

    **Breaking Change:** Change the precedence of aliases so child model aliases override parent aliases,

  • 1.0 \u2192 1.0breaking

    Fix issue with `BaseSettings` inheritance and `alias` getting set to `None`, [#882](https://github.com/pydantic/pydantic/pull/882) by @samuelcolvin

  • 1.0 \u2192 1.0breaking

    Modify `__repr__` and `__str__` methods to be consistent across all public classes, add `__pretty__` to support

  • 1.0 \u2192 1.0breaking

    For `BaseSettings` merge environment variables and in-code values recursively, as long as they create a valid object

  • 1.0 \u2192 1.0breaking

    Add example for the `construct()` method, [#907](https://github.com/pydantic/pydantic/pull/907) by @ashears

  • 1.0 \u2192 1.0breaking

    Improve use of `Field` constraints on complex types, raise an error if constraints are not enforceable,

  • 1.0 \u2192 1.0breaking

    update docs for bool missing valid value, [#911](https://github.com/pydantic/pydantic/pull/911) by @trim21

  • 1.0 \u2192 1.0breaking

    Better `str`/`repr` logic for `ModelField`, [#912](https://github.com/pydantic/pydantic/pull/912) by @samuelcolvin

  • 1.0 \u2192 1.0breaking

    Fix JSON serialization errors on `ValidationError.json()` by using `pydantic_encoder`, [#922](https://github.com/pydantic/pydantic/pull/922) by @samuelcolvin

  • 1.0 \u2192 1.0deprecated

    Use `FutureWarning` instead of `DeprecationWarning` when `alias` instead of `env` is used for settings models, [#881](https://github.com/pydantic/pydantic/pull/881) by @samuelcolvin

  • 1.0 \u2192 1.0deprecated

    deprecation warning for `case_insensitive` on `BaseSettings` config, [#885](https://github.com/pydantic/pydantic/pull/885) by @samuelcolvin

  • 1.0 \u2192 1.0deprecated

    **Breaking Change:** deprecate the `Model.fields` property, use `Model.__fields__` instead, [#883](https://github.com/pydantic/pydantic/pull/883) by @samuelcolvin

  • 1.0 \u2192 1.0removed

    Clarify usage of `remove_untouched`, improve error message for types with no validators, [#926](https://github.com/pydantic/pydantic/pull/926) by @retnikt

  • 1.0 \u2192 1.0renamed

    **Breaking change:** Rename `skip_defaults` to `exclude_unset`, and add ability to exclude actual defaults, [#915](https://github.com/pydantic/pydantic/pull/915) by @dmontagu

  • 0.32.2 \u2192 1.0behavior

    **Breaking Change:** alter the behaviour of `dict(model)` so that sub-models are no longer

  • 0.32.2 \u2192 1.0behavior

    **Breaking Change:** modify parsing behavior for `bool`, [#617](https://github.com/pydantic/pydantic/pull/617) by @dmontagu

  • 0.32.2 \u2192 1.0breaking

    **Breaking change:** Added `initvars` support to `post_init_post_parse`, [#748](https://github.com/pydantic/pydantic/pull/748) by @Raphael-C-Almeida

  • 0.32.2 \u2192 1.0breaking

    **Breaking Change:** `get_validators` is no longer recognised, use `__get_validators__`.

  • 0.32.2 \u2192 1.0breaking

    **Breaking Change:** Make `BaseModel.json()` only serialize the `__root__` key for models with custom root, [#752](https://github.com/pydantic/pydantic/pull/752) by @dmontagu

  • 0.32.2 \u2192 1.0breaking

    **Breaking Change:** complete rewrite of `URL` parsing logic, [#755](https://github.com/pydantic/pydantic/pull/755) by @samuelcolvin

  • 0.32.2 \u2192 1.0breaking

    **Breaking Change:** preserve superclass annotations for field-determination when not provided in subclass, [#757](https://github.com/pydantic/pydantic/pull/757) by @dmontagu

  • 0.32.2 \u2192 1.0breaking

    **Breaking Change:** `BaseSettings` now uses the special `env` settings to define which environment variables to

  • 0.32.2 \u2192 1.0breaking

    add support for `assert` statements inside validators, [#653](https://github.com/pydantic/pydantic/pull/653) by @abdusco

  • 0.32.2 \u2192 1.0breaking

    Update documentation to specify the use of `pydantic.dataclasses.dataclass` and subclassing `pydantic.BaseModel`, [#710](https://github.com/pydantic/pydantic/pull/710) by @maddosaurus

  • 0.32.2 \u2192 1.0breaking

    Allow custom JSON decoding and encoding via `json_loads` and `json_dumps` `Config` properties, [#714](https://github.com/pydantic/pydantic/pull/714) by @samuelcolvin

  • 0.32.2 \u2192 1.0breaking

    make all annotated fields occur in the order declared, [#715](https://github.com/pydantic/pydantic/pull/715) by @dmontagu

  • 0.32.2 \u2192 1.0breaking

    use pytest to test `mypy` integration, [#735](https://github.com/pydantic/pydantic/pull/735) by @dmontagu

  • 0.32.2 \u2192 1.0breaking

    add `__repr__` method to `ErrorWrapper`, [#738](https://github.com/pydantic/pydantic/pull/738) by @samuelcolvin

  • 0.32.2 \u2192 1.0breaking

    Added support for `FrozenSet` members in dataclasses, and a better error when attempting to use types from the `typing` module that are not supported by Pydantic, [#745](https://github.com/pydantic/pydantic/pull/745) by @djpetti

  • 0.32.2 \u2192 1.0breaking

    add documentation for Pycharm Plugin, [#750](https://github.com/pydantic/pydantic/pull/750) by @koxudaxi

  • 0.32.2 \u2192 1.0breaking

    fix broken examples in the docs, [#753](https://github.com/pydantic/pydantic/pull/753) by @dmontagu

  • 0.32.2 \u2192 1.0breaking

    moving typing related objects into `pydantic.typing`, [#761](https://github.com/pydantic/pydantic/pull/761) by @samuelcolvin

  • 0.32.2 \u2192 1.0breaking

    Minor performance improvements to `ErrorWrapper`, `ValidationError` and datetime parsing, [#763](https://github.com/pydantic/pydantic/pull/763) by @samuelcolvin

  • 0.32.2 \u2192 1.0breaking

    Improvements to `datetime`/`date`/`time`/`timedelta` types: more descriptive errors,

  • 0.32.2 \u2192 1.0breaking

    fix error messages for `Literal` types with multiple allowed values, [#770](https://github.com/pydantic/pydantic/pull/770) by @dmontagu

  • 0.32.2 \u2192 1.0breaking

    Improved auto-generated `title` field in JSON schema by converting underscore to space, [#772](https://github.com/pydantic/pydantic/pull/772) by @skewty

  • 0.32.2 \u2192 1.0renamed

    **Breaking Change:** modify default config settings for `BaseSettings`; `case_insensitive` renamed to `case_sensitive`,

  • 0.32.2 \u2192 1.0renamed

    **Breaking change:** Implement `root_validator` and rename root errors from `__obj__` to `__root__`, [#729](https://github.com/pydantic/pydantic/pull/729) by @samuelcolvin

  • 0.32.2 \u2192 1.0renamed

    **Breaking Change:** rename `Schema` to `Field`, make it a function to placate mypy, [#577](https://github.com/pydantic/pydantic/pull/577) by @samuelcolvin

  • 0.7.1 \u2192 0.8.0breaking

    fix type annotation for `inherit_config` [#139](https://github.com/pydantic/pydantic/pull/139)

  • 0.7.1 \u2192 0.8.0breaking

    validate attributes of parent models [#141](https://github.com/pydantic/pydantic/pull/141)

  • 0.7.1 \u2192 0.8.0breaking

    **breaking change**: email validation now uses

  • 0.7.1 \u2192 0.8.0breaking

    **breaking change**: check for invalid field names in validators [#140](https://github.com/pydantic/pydantic/pull/140)

  • 0.6.4 \u2192 0.7.0breaking

    added compatibility with abstract base classes (ABCs) [#123](https://github.com/pydantic/pydantic/pull/123)

  • 0.6.4 \u2192 0.7.0breaking

    add wildcard validators of the form `@validate('*')` [#128](https://github.com/pydantic/pydantic/pull/128)

  • 0.6.4 \u2192 0.7.0breaking

    add `Config.use_enum_values` [#127](https://github.com/pydantic/pydantic/pull/127)

  • 0.6.4 \u2192 0.7.0breaking

    add `create_model` method [#113](https://github.com/pydantic/pydantic/pull/113) [#125](https://github.com/pydantic/pydantic/pull/125)

  • 0.6.4 \u2192 0.7.0removed

    remove use of `OrderedDict` and use simple dict [#126](https://github.com/pydantic/pydantic/pull/126)

  • 0.6.4 \u2192 0.7.0removed

    **breaking change**: remove deprecated `.values()` on a model, use `.dict()` instead

  • 0.6.4 \u2192 0.7.0renamed

    **breaking change**: rename `.config` to `.__config__` on a model

  • 0.31.1 \u2192 0.32breaking

    add model name to `ValidationError` error message, [#676](https://github.com/pydantic/pydantic/pull/676) by @dmontagu

  • 0.31.1 \u2192 0.32breaking

    support `ForwardRef` (without self-referencing annotations) in Python 3.6, [#706](https://github.com/pydantic/pydantic/pull/706) by @koxudaxi

  • 0.31.1 \u2192 0.32breaking

    implement `schema_extra` in `Config` sub-class, [#663](https://github.com/pydantic/pydantic/pull/663) by @tiangolo

  • 0.31.1 \u2192 0.32removed

    **breaking change**: remove `__getattr__` and rename `__values__` to `__dict__` on `BaseModel`,

  • 0.27.0 \u2192 0.27api

    fix handling of generic types without specified parameters, [#550](https://github.com/pydantic/pydantic/pull/550) by @dmontagu

  • 0.27.0 \u2192 0.27breaking

    **breaking change** (maybe): this is the first release compiled with **cython**, see the docs and please

  • 0.27.0 \u2192 0.27breaking

    **breaking change** `_pydantic_post_init` to execute dataclass' original `__post_init__` before

  • 0.25 \u2192 0.26breaking

    fix variable length tuples support, [#495](https://github.com/pydantic/pydantic/pull/495) by @pilosus

  • 0.25 \u2192 0.26breaking

    add `Color` type, [#504](https://github.com/pydantic/pydantic/pull/504) by @pilosus and @samuelcolvin

  • 0.25 \u2192 0.26breaking

    fix to schema generation for `IPvAnyAddress`, `IPvAnyInterface`, `IPvAnyNetwork` [#498](https://github.com/pydantic/pydantic/pull/498) by @pilosus

  • 0.25 \u2192 0.26breaking

    fix to schema generation for `IPv4Address`, `IPv6Address`, `IPv4Interface`,

  • 0.25 \u2192 0.26breaking

    **Breaking Change:** fix `.dict(skip_keys=True)` skipping values set via alias (this involves changing

  • 0.25 \u2192 0.26breaking

    fix return type hint for `create_model`, [#526](https://github.com/pydantic/pydantic/pull/526) by @dmontagu

  • 0.19.0 \u2192 0.20.0api

    **breaking change** (maybe): more sophisticated argument parsing for validators, any subset of

  • 0.19.0 \u2192 0.20.0api

    **breaking change**: Adds `skip_defaults` argument to `BaseModel.dict()` to allow skipping of fields that

  • 0.19.0 \u2192 0.20.0behavior

    Fix `extra` behaviour for multiple inheritance/mix-ins, [#394](https://github.com/pydantic/pydantic/pull/394) by @YaraslauZhylko

  • 0.19.0 \u2192 0.20.0breaking

    add `py.typed` marker file for PEP-561 support, [#391](https://github.com/pydantic/pydantic/pull/391) by @je-l

  • 0.1.0 \u2192 0.2.0breaking

    **breaking change**: `values()` on a model is now a method not a property,

  • 0.1.0 \u2192 0.2.0breaking

    allow annotation only fields to support mypy

  • 0.1.0 \u2192 0.2.0breaking

    add pretty `to_string(pretty=True)` method for models

  • 0.17.0 \u2192 0.18.0behavior

    Fix validators with `always=True` when the default is `None` or the type is optional, also prevent

  • 0.17.0 \u2192 0.18.0breaking

    fix `ignore_extra=False` and `allow_population_by_alias=True`, fix [#257](https://github.com/pydantic/pydantic/pull/257) by @samuelcolvin

  • 0.17.0 \u2192 0.18.0breaking

    add support for postponed annotations, [#348](https://github.com/pydantic/pydantic/pull/348) by @samuelcolvin

  • 0.17.0 \u2192 0.18.0breaking

    **breaking change**: don't call validators on keys of dictionaries, [#254](https://github.com/pydantic/pydantic/pull/254) by @samuelcolvin

  • 0.17.0 \u2192 0.18.0breaking

    improve documentation for settings priority and allow it to be easily changed, [#343](https://github.com/pydantic/pydantic/pull/343) by @samuelcolvin

  • 0.17.0 \u2192 0.18.0breaking

    **breaking change**: Set `BaseConfig` attributes `min_anystr_length` and `max_anystr_length` to

  • 0.16.1 \u2192 0.17.0breaking

    support for passing Config class in dataclasses decorator, [#276](https://github.com/pydantic/pydantic/pull/276) by @jarekkar

  • 0.16.1 \u2192 0.17.0breaking

    add "Using Pydantic" section to docs, [#323](https://github.com/pydantic/pydantic/pull/323) by @tiangolo & [#326](https://github.com/pydantic/pydantic/pull/326) by @samuelcolvin

  • 0.16.1 \u2192 0.17.0breaking

    support for nested dataclasses, [#334](https://github.com/pydantic/pydantic/pull/334) by @samuelcolvin

  • 0.16.1 \u2192 0.17.0breaking

    better errors when getting an `ImportError` with `PyObject`, [#309](https://github.com/pydantic/pydantic/pull/309) by @samuelcolvin

  • 0.16.1 \u2192 0.17.0breaking

    support `ClassVar` by excluding such attributes from fields, [#184](https://github.com/pydantic/pydantic/pull/184) by @samuelcolvin

  • 0.16.1 \u2192 0.17.0breaking

    fix schema generation for fields annotated as `: dict`, `: list`,

  • 0.16.1 \u2192 0.17.0breaking

    add support for constrained strings as dict keys in schema, [#332](https://github.com/pydantic/pydantic/pull/332) by @tiangolo

  • 0.16.1 \u2192 0.17.0breaking

    prevent duplicate validator check in ipython, fix [#312](https://github.com/pydantic/pydantic/pull/312) by @samuelcolvin

  • 0.16.1 \u2192 0.17.0breaking

    prevent validators being called repeatedly after inheritance, [#327](https://github.com/pydantic/pydantic/pull/327) by @samuelcolvin

  • 0.16.1 \u2192 0.17.0breaking

    fix schema for `timedelta` as number, [#325](https://github.com/pydantic/pydantic/pull/325) by @tiangolo

  • 0.16.1 \u2192 0.17.0renamed

    rename `get_validators` to `__get_validators__`, deprecation warning on use of old name, [#338](https://github.com/pydantic/pydantic/pull/338) by @samuelcolvin

  • 0.15.0 \u2192 0.16.0api

    **breaking change**: refactor schema generation to be compatible with JSON Schema and OpenAPI specs, [#308](https://github.com/pydantic/pydantic/pull/308) by @tiangolo

  • 0.15.0 \u2192 0.16.0breaking

    add `case_insensitive` option to `BaseSettings` `Config`, [#277](https://github.com/pydantic/pydantic/pull/277) by @jasonkuhrt

  • 0.15.0 \u2192 0.16.0breaking

    add `schema` to `schema` module to generate top-level schemas from base models, [#308](https://github.com/pydantic/pydantic/pull/308) by @tiangolo

  • 0.15.0 \u2192 0.16.0breaking

    add additional fields to `Schema` class to declare validation for `str` and numeric values, [#311](https://github.com/pydantic/pydantic/pull/311) by @tiangolo

  • 0.15.0 \u2192 0.16.0renamed

    rename `_schema` to `schema` on fields, [#318](https://github.com/pydantic/pydantic/pull/318) by @samuelcolvin

  • 0.10.0 \u2192 0.11.0breaking

    JSON serialization of models and schemas [#133](https://github.com/pydantic/pydantic/pull/133)

  • 0.10.0 \u2192 0.11.0breaking

    model schema generation [#190](https://github.com/pydantic/pydantic/pull/190)

  • 0.10.0 \u2192 0.11.0breaking

    make `list`, `tuple` and `set` types stricter [#86](https://github.com/pydantic/pydantic/pull/86)

  • 0.10.0 \u2192 0.11.0breaking

    add `FilePath` and `DirectoryPath` types [#10](https://github.com/pydantic/pydantic/pull/10)

  • 0.10.0 \u2192 0.11.0removed

    **breaking change**: remove msgpack parsing [#201](https://github.com/pydantic/pydantic/pull/201)

  • 0.9.1 \u2192 0.10.0api

    **breaking change**: correct behaviour of `lt` and `gt` arguments to `conint` etc. [#188](https://github.com/pydantic/pydantic/pull/188)

  • 0.9.1 \u2192 0.10.0behavior

    copy defaults to model values, so different models don't share objects [#154](https://github.com/pydantic/pydantic/pull/154)

  • 0.9.1 \u2192 0.10.0breaking

    fix typo in validator exception [#150](https://github.com/pydantic/pydantic/pull/150)

  • 0.9.1 \u2192 0.10.0breaking

    add `Config.allow_population_by_alias` [#160](https://github.com/pydantic/pydantic/pull/160), thanks @bendemaree

  • 0.9.1 \u2192 0.10.0breaking

    **breaking change**: new errors format [#179](https://github.com/pydantic/pydantic/pull/179), thanks @Gr1N

  • 0.9.1 \u2192 0.10.0breaking

    added error context and ability to redefine error message templates using `Config.error_msg_templates` [#183](https://github.com/pydantic/pydantic/pull/183),

  • 0.9.1 \u2192 0.10.0removed

    **breaking change**: removed `Config.min_number_size` and `Config.max_number_size` [#183](https://github.com/pydantic/pydantic/pull/183), thanks @Gr1N

API access

Get this data programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/breaking/pypi/pydantic
pydantic breaking changes — PyPI migration guide | DepScope