Upgrading pydantic 0.6 to 0.7
Breaking0.6.4 → 0.7.1Breaking2New4Changed1Fixed1
BreakingUpgrade verdict
2 breaking changes.
In plain terms
- Code that reads a model's config attribute must use the new name.
- The old values() method is gone, so use dict() to get the model's data.
Must act 2 items need code or config changes
What you must change
Breaking2
Renames .config to .__config__ on a model.
.config.__config__Removes the deprecated .values() on a model; use .dict() instead.
.values().dict()API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- added:
export BaseConfig - added:
export create_model
- removed:
method BaseModel.values(**kwargs) - changed:
class MetaModel(type) → class MetaModel(ABCMeta) - added:
field BaseConfig.use_enum_values - added:
function create_model(model_name: str, *, __config__: Type[BaseConfig]=…, __base__: Type[BaseModel]=…, **field_definitions)
- changed:
function enum_validator(v, field, **kwargs) -> Enum → function enum_validator(v, field, config, **kwargs) -> Enum