Skip to content

Upgrading pydantic 0.7 to 0.8

Breaking0.7.1 → 0.8Breaking2Fixed1Other1

BreakingUpgrade verdict

2 breaking changes.

  • breaking change: check for invalid field names in validators.
  • breaking change: email validation now uses email-validator.
2 items need code or config changes
Breaking2
breaking change: check for invalid field names in validators.
breaking change: email validation now uses email-validator.

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • changed: constructor Field(*, name: str, type_: Type, alias: str=…, class_validators: List[Validator]=…, default: Any=…, required: bool=…, allow_none: bool=…, model_config: Any=…, description: str=…) → constructor Field(*, name: str, type_: Type, class_validators: List[Validator], default: Any, required: bool, model_config: Any, alias: str=…, allow_none: bool=…, description: str=…)
  • added: field Validator.check_fields: bool
  • added: method Field.prepare()
  • changed: function inherit_config(self_config, parent_config) -> BaseConfig → function inherit_config(self_config, parent_config) -> Type[BaseConfig]
  • changed: function validator(*fields, pre: bool=…, whole: bool=…, always: bool=…) → function validator(*fields, pre: bool=…, whole: bool=…, always: bool=…, check_fields: bool=…)
  • added: class ValidatorGroup
  • added: constructor ValidatorGroup(validators)
  • added: method ValidatorGroup.check_for_unused()
  • added: method ValidatorGroup.get_validators(name)
  • removed: variable EMAIL_REGEX
  • added: variable email_validator