Skip to content

Upgrading pydantic 0.9 to 0.10

Breaking0.9.1 → 0.10Breaking3New2Changed1Fixed1

BreakingUpgrade verdict

3 breaking changes.

  • breaking change: removed Config.min_number_size and Config.max_number_size.
  • breaking change: new errors format.
  • breaking change: correct behaviour of lt and gt arguments to conint etc. for the old behaviour use le and ge.
3 items need code or config changes
Breaking3
breaking change: removed Config.min_number_size and Config.max_number_size.
Config.min_number_sizeConfig.max_number_size
breaking change: new errors format.
breaking change: correct behaviour of lt and gt arguments to conint etc. for the old behaviour use le and ge.
ltgtconintlege

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

  • added: export ValidationError
  • added: class ErrorWrapper
  • added: class ValidationError(ValueError)
  • added: constructor ErrorWrapper(exc, *, loc, config=…)
  • added: constructor ValidationError(errors)
  • added: method ErrorWrapper.dict(*, loc_prefix=…)
  • added: method ValidationError.errors()
  • added: method ValidationError.json(*, indent=…)
  • added: property ErrorWrapper.ctx
  • added: property ErrorWrapper.msg
  • added: property ErrorWrapper.type_
  • added: class AnyStrMaxLengthError(PydanticValueError)
  • added: class AnyStrMinLengthError(PydanticValueError)
  • added: class BytesError(PydanticTypeError)
  • added: class ConfigError(RuntimeError)
  • added: class DSNDriverIsEmptyError(PydanticValueError)
  • added: class DateError(PydanticTypeError)
  • added: class DateTimeError(PydanticTypeError)
  • added: class DecimalError(PydanticTypeError)
  • added: class DecimalIsNotFiniteError(PydanticValueError)
  • added: class DecimalMaxDigitsError(PydanticValueError)
  • added: class DecimalMaxPlacesError(PydanticValueError)
  • added: class DecimalWholeDigitsError(PydanticValueError)
  • added: class DictError(PydanticTypeError)
  • added: class DurationError(PydanticTypeError)
  • added: class EmailError(PydanticValueError)
  • added: class EnumError(PydanticTypeError)
  • added: class ExtraError(PydanticValueError)
  • added: class FloatError(PydanticTypeError)
  • added: class IntegerError(PydanticTypeError)
  • added: class ListError(PydanticTypeError)
  • added: class MissingError(PydanticValueError)
  • added: class NoneIsNotAllowedError(PydanticTypeError)
  • added: class NumberNotGeError(_NumberBoundError)
  • added: class NumberNotGtError(_NumberBoundError)
  • added: class NumberNotLeError(_NumberBoundError)
  • added: class NumberNotLtError(_NumberBoundError)
  • added: class PathError(PydanticTypeError)
  • added: class PyObjectError(PydanticTypeError)
  • added: class PydanticErrorMixin
  • added: class PydanticTypeError(PydanticErrorMixin, TypeError)
  • added: class PydanticValueError(PydanticErrorMixin, ValueError)
  • added: class SequenceError(PydanticTypeError)
  • added: class SetError(PydanticTypeError)
  • added: class StrError(PydanticTypeError)
  • added: class StrRegexError(PydanticValueError)
  • added: class TimeError(PydanticTypeError)
  • added: class TupleError(PydanticTypeError)
  • added: class UUIDError(PydanticTypeError)
  • added: class UUIDVersionError(PydanticValueError)
  • added: constructor AnyStrMaxLengthError(*, limit_value: int) -> None
  • added: constructor AnyStrMinLengthError(*, limit_value: int) -> None
  • added: constructor DecimalMaxDigitsError(*, max_digits: int) -> None
  • added: constructor DecimalMaxPlacesError(*, decimal_places: int) -> None
  • added: constructor DecimalWholeDigitsError(*, whole_digits: int) -> None
  • added: constructor PydanticErrorMixin(**ctx) -> None
  • added: constructor StrRegexError(*, pattern: str) -> None
  • added: constructor UUIDVersionError(*, required_version: int) -> None
  • added: field AnyStrMaxLengthError.code
  • added: field AnyStrMaxLengthError.msg_template
  • added: field AnyStrMinLengthError.code
  • added: field AnyStrMinLengthError.msg_template
  • added: field BytesError.msg_template
  • added: field DSNDriverIsEmptyError.code
  • added: field DSNDriverIsEmptyError.msg_template
  • added: field DateError.msg_template
  • added: field DateTimeError.msg_template
  • added: field DecimalError.msg_template
  • added: field DecimalIsNotFiniteError.code
  • added: field DecimalIsNotFiniteError.msg_template
  • added: field DecimalMaxDigitsError.code
  • added: field DecimalMaxDigitsError.msg_template
  • added: field DecimalMaxPlacesError.code
  • added: field DecimalMaxPlacesError.msg_template
  • added: field DecimalWholeDigitsError.code
  • added: field DecimalWholeDigitsError.msg_template
  • added: field DictError.msg_template
  • added: field DurationError.msg_template
  • added: field EmailError.msg_template
  • added: field EnumError.msg_template
  • added: field ExtraError.msg_template
  • added: field FloatError.msg_template
  • added: field IntegerError.msg_template
  • added: field ListError.msg_template
  • added: field MissingError.msg_template
  • added: field NoneIsNotAllowedError.code
  • added: field NoneIsNotAllowedError.msg_template
  • added: field NumberNotGeError.code
  • added: field NumberNotGeError.msg_template
  • added: field NumberNotGtError.code
  • added: field NumberNotGtError.msg_template
  • added: field NumberNotLeError.code
  • added: field NumberNotLeError.msg_template
  • added: field NumberNotLtError.code
  • added: field NumberNotLtError.msg_template
  • added: field PathError.msg_template
  • added: field PyObjectError.msg_template
  • added: field PydanticErrorMixin.code: str
  • added: field PydanticErrorMixin.msg_template: str
  • added: field SequenceError.msg_template
  • added: field SetError.msg_template
  • added: field StrError.msg_template
  • added: field StrRegexError.code
  • added: field StrRegexError.msg_template
  • added: field TimeError.msg_template
  • added: field TupleError.msg_template
  • added: field UUIDError.msg_template
  • added: field UUIDVersionError.code
  • added: field UUIDVersionError.msg_template
  • removed: class ConfigError(RuntimeError)
  • removed: class Extra(ValueError)
  • removed: class Missing(ValueError)
  • removed: class ValidationError(ValueError)
  • removed: constructor ValidationError(errors)
  • removed: method ValidationError.json(indent=…)
  • removed: property ValidationError.display_errors
  • removed: property ValidationError.errors_dict
  • removed: variable Error
  • changed: method Field.validate(v, values, index=…, cls=…) → method Field.validate(v, values, *, loc, cls=…)
  • removed: field BaseConfig.max_number_size
  • removed: field BaseConfig.min_number_size
  • removed: variable EXTRA_ERROR
  • removed: variable MISSING
  • removed: variable MISSING_ERROR
  • added: field BaseConfig.allow_population_by_alias
  • added: field BaseConfig.error_msg_templates: Dict[str, str]
  • changed: function condecimal(*, gt=…, lt=…, max_digits=…, decimal_places=…) -> Type[Decimal] → function condecimal(*, gt=…, ge=…, lt=…, le=…, max_digits=…, decimal_places=…) -> Type[Decimal]
  • changed: function confloat(*, gt=…, lt=…) -> Type[float] → function confloat(*, gt=…, ge=…, lt=…, le=…) -> Type[float]
  • changed: function conint(*, gt=…, lt=…) -> Type[int] → function conint(*, gt=…, ge=…, lt=…, le=…) -> Type[int]
  • added: field ConstrainedDecimal.ge: Union[None, int, float, Decimal]
  • added: field ConstrainedDecimal.le: Union[None, int, float, Decimal]
  • added: field ConstrainedFloat.ge: Union[None, int, float]
  • added: field ConstrainedFloat.le: Union[None, int, float]
  • added: field ConstrainedInt.ge: Optional[int]
  • added: field ConstrainedInt.le: Optional[int]
  • added: function change_exception(raise_exc, *except_types)
  • added: function display_as_type(v)
  • removed: function display_as_type(v)
  • added: function float_validator(v) -> float
  • added: function int_validator(v) -> int
  • added: function path_validator(v) -> Path