Upgrading pydantic 0.23 to 0.24
Safe0.23 → 0.24New1Fixed5
SafeUpgrade verdict
Only new features and fixes in this range.
In plain terms
- Nothing in this range needs changes to your code. It adds features and fixes.
Must act Nothing to change
No breaking, platform, security or deprecated items in this range.
Nothing in this upgrade needs a code or configuration change.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- added:
function gather_validators(type_: ModelOrDc) -> Dict[str, classmethod]
- changed:
method Field.validate(v: Any, values: Dict[str, Any], *, loc: LocType, cls: Optional[Type[BaseModel]]=…) -> ValidateReturn → method Field.validate(v: Any, values: Dict[str, Any], *, loc: LocType, cls: Optional[ModelOrDc]=…) -> ValidateReturn
- changed:
function create_model(model_name: str, *, __config__: Type[BaseConfig]=…, __base__: Type[BaseModel]=…, __module__: Optional[str]=…, **field_definitions: Any) -> BaseModel → function create_model(model_name: str, *, __config__: Type[BaseConfig]=…, __base__: Type[BaseModel]=…, __module__: Optional[str]=…, __validators__: Dict[str, classmethod]=…, **field_definitions: Any) -> BaseModel - changed:
function validate_model(model: Union[BaseModel, Type[BaseModel]], input_data: DictStrAny, raise_exc: bool=…) -> Union[DictStrAny, Tuple[DictStrAny, Optional[ValidationError]]] → function validate_model(model: Union[BaseModel, Type[BaseModel]], input_data: DictStrAny, raise_exc: bool=…, cls: ModelOrDc=…) -> Union[DictStrAny, Tuple[DictStrAny, Optional[ValidationError]]] - changed:
static method BaseModel.parse_obj(obj: DictAny) -> Model → static method BaseModel.parse_obj(obj: Mapping[Any, Any]) -> Model
- added:
method SecretBytes.display() -> str - added:
method SecretStr.display() -> str
- added:
function update_field_forward_refs(field: Field, globalns: Any, localns: Any) -> None