Upgrading pydantic 0.3 to 0.4
Breaking0.3 → 0.4Breaking1New1Changed3Fixed1
BreakingUpgrade verdict
1 breaking change.
In plain terms
- Fields declared only with a type annotation now appear first in the model's field order rather than last.
Must act 1 item needs code or config changes
What you must change
Breaking1
Moves annotation only fields to the start of the fields list instead of the end.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- added:
export Protocol
- removed:
function pretty_errors(e) - removed:
function type_display(type_: type) - removed:
variable E_KEYS
- added:
method Field.set_config(config)
- added:
static method BaseModel.parse_file(path: Union[str, Path], *, content_type: str=…, encoding: str=…, proto: Protocol=…, allow_pickle: bool=…) - added:
static method BaseModel.parse_obj(obj) - added:
static method BaseModel.parse_raw(b: StrBytes, *, content_type: str=…, encoding: str=…, proto: Protocol=…, allow_pickle: bool=…)
- added:
class Protocol(str, Enum) - added:
field Protocol.json - added:
field Protocol.msgpack - added:
field Protocol.pickle - added:
function load_file(path: Union[str, Path], *, content_type: str=…, encoding: str=…, proto: Protocol=…, allow_pickle: bool=…) -> Any - added:
function load_str_bytes(b: StrBytes, *, content_type: str=…, encoding: str=…, proto: Protocol=…, allow_pickle: bool=…) -> Any - added:
variable msgpack
- added:
function truncate(v, *, max_len=…)