Upgrading pydantic 0.27 to 0.28
Safe0.27 → 0.28New4Fixed2
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:
class StrictBoolError(PydanticValueError) - added:
field StrictBoolError.msg_template
- changed:
static method BaseModel.validate(value: Union[DictStrAny, Model]) -> Model → static method BaseModel.validate(value: Any) -> Model - added:
field BaseConfig.orm_mode: bool - added:
static method BaseModel.from_orm(obj: Any) -> Model
- changed:
function field_schema(field: Field, *, by_alias: bool=…, model_name_map: Dict[Type[BaseModel], str], ref_prefix: Optional[str]=…) -> Tuple[Dict[str, Any], Dict[str, Any]] → function field_schema(field: Field, *, by_alias: bool=…, model_name_map: Dict[Type[BaseModel], str], ref_prefix: Optional[str]=…, known_models: Set[Type[BaseModel]]=…) -> Tuple[Dict[str, Any], Dict[str, Any]] - changed:
function field_singleton_schema(field: Field, *, by_alias: bool, model_name_map: Dict[Type[BaseModel], str], schema_overrides: bool=…, ref_prefix: Optional[str]=…) -> Tuple[Dict[str, Any], Dict[str, Any]] → function field_singleton_schema(field: Field, *, by_alias: bool, model_name_map: Dict[Type[BaseModel], str], schema_overrides: bool=…, ref_prefix: Optional[str]=…, known_models: Set[Type[BaseModel]]) -> Tuple[Dict[str, Any], Dict[str, Any]] - changed:
function field_singleton_sub_fields_schema(sub_fields: Sequence[Field], *, by_alias: bool, model_name_map: Dict[Type[BaseModel], str], schema_overrides: bool=…, ref_prefix: Optional[str]=…) -> Tuple[Dict[str, Any], Dict[str, Any]] → function field_singleton_sub_fields_schema(sub_fields: Sequence[Field], *, by_alias: bool, model_name_map: Dict[Type[BaseModel], str], schema_overrides: bool=…, ref_prefix: Optional[str]=…, known_models: Set[Type[BaseModel]]) -> Tuple[Dict[str, Any], Dict[str, Any]] - changed:
function field_type_schema(field: Field, *, by_alias: bool, model_name_map: Dict[Type[BaseModel], str], schema_overrides: bool=…, ref_prefix: Optional[str]=…) -> Tuple[Dict[str, Any], Dict[str, Any]] → function field_type_schema(field: Field, *, by_alias: bool, model_name_map: Dict[Type[BaseModel], str], schema_overrides: bool=…, ref_prefix: Optional[str]=…, known_models: Set[Type[BaseModel]]) -> Tuple[Dict[str, Any], Dict[str, Any]] - changed:
function get_flat_models_from_field(field: Field) -> Set[Type[BaseModel]] → function get_flat_models_from_field(field: Field, known_models: Set[Type[BaseModel]]) -> Set[Type[BaseModel]] - changed:
function get_flat_models_from_fields(fields: Sequence[Field]) -> Set[Type[BaseModel]] → function get_flat_models_from_fields(fields: Sequence[Field], known_models: Set[Type[BaseModel]]) -> Set[Type[BaseModel]] - changed:
function get_flat_models_from_model(model: Type[BaseModel]) -> Set[Type[BaseModel]] → function get_flat_models_from_model(model: Type[BaseModel], known_models: Set[Type[BaseModel]]=…) -> Set[Type[BaseModel]] - changed:
function model_process_schema(model: Type[BaseModel], *, by_alias: bool=…, model_name_map: Dict[Type[BaseModel], str], ref_prefix: Optional[str]=…) -> Tuple[Dict[str, Any], Dict[str, Any]] → function model_process_schema(model: Type[BaseModel], *, by_alias: bool=…, model_name_map: Dict[Type[BaseModel], str], ref_prefix: Optional[str]=…, known_models: Set[Type[BaseModel]]=…) -> Tuple[Dict[str, Any], Dict[str, Any]] - changed:
function model_type_schema(model: Type[BaseModel], *, by_alias: bool, model_name_map: Dict[Type[BaseModel], str], ref_prefix: Optional[str]=…) -> Tuple[Dict[str, Any], Dict[str, Any]] → function model_type_schema(model: Type[BaseModel], *, by_alias: bool, model_name_map: Dict[Type[BaseModel], str], ref_prefix: Optional[str]=…, known_models: Set[Type[BaseModel]]) -> Tuple[Dict[str, Any], Dict[str, Any]]
- added:
class StrictBool(int) - added:
static method StrictBool.validate(value: Any) -> bool
- added:
class GetterDict - added:
constructor GetterDict(obj: Any) - added:
method GetterDict.get(item: Any, default: Any) -> Any - added:
method GetterDict.keys() -> Set[Any]