Upgrading attrs 19 to 20
Unknown19.3.0 → 20.3.0
Fetching 3 releases from GitHub…0 / 3
UnknownUpgrade verdict
DepDelta is still reading the notes for this range, so breaking changes can't be ruled out yet.
In plain terms
- DepDelta is still reading the release notes in this range, so it can't rule out breaking changes yet.
- This page updates as the notes come in.
Must act Still reading release notes
DepDelta is still reading the release notes in this range. This updates as they come in.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- changed:
field Attribute.converter: Optional[_ConverterType[_T]] → field Attribute.converter: Optional[_ConverterType] - changed:
function asdict(inst: Any, recurse: bool=…, filter: Optional[_FilterType[Any]]=…, dict_factory: Type[Mapping[Any, Any]]=…, retain_collection_types: bool=…) -> Dict[str, Any] → function asdict(inst: Any, recurse: bool=…, filter: Optional[_FilterType[Any]]=…, dict_factory: Type[Mapping[Any, Any]]=…, retain_collection_types: bool=…, value_serializer: Optional[Callable[[type, Attribute, Any], Any]]=…) -> Dict[str, Any] - changed:
function attrib(default: None=…, validator: None=…, repr: _ReprArgType=…, cmp: Optional[bool]=…, hash: Optional[bool]=…, init: bool=…, metadata: Optional[Mapping[Any, Any]]=…, type: None=…, converter: None=…, factory: None=…, kw_only: bool=…, eq: Optional[bool]=…, order: Optional[bool]=…) -> Any | (default: None=…, validator: Optional[_ValidatorArgType[_T]]=…, repr: _ReprArgType=…, cmp: Optional[… → function attrib(default: None=…, validator: None=…, repr: _ReprArgType=…, cmp: Optional[bool]=…, hash: Optional[bool]=…, init: bool=…, metadata: Optional[Mapping[Any, Any]]=…, type: None=…, converter: None=…, factory: None=…, kw_only: bool=…, eq: Optional[bool]=…, order: Optional[bool]=…, on_setattr: Optional[_OnSetAttrArgType]=…) -> Any | (default: None=…, validator: Optional[_ValidatorArgType[_… - changed:
function attrs(maybe_cls: _C, these: Optional[Dict[str, Any]]=…, repr_ns: Optional[str]=…, repr: bool=…, cmp: Optional[bool]=…, hash: Optional[bool]=…, init: bool=…, slots: bool=…, frozen: bool=…, weakref_slot: bool=…, str: bool=…, auto_attribs: bool=…, kw_only: bool=…, cache_hash: bool=…, auto_exc: bool=…, eq: Optional[bool]=…, order: Optional[bool]=…) -> _C | (maybe_cls: None=…, these: Optional… → function attrs(maybe_cls: _C, these: Optional[Dict[str, Any]]=…, repr_ns: Optional[str]=…, repr: bool=…, cmp: Optional[bool]=…, hash: Optional[bool]=…, init: bool=…, slots: bool=…, frozen: bool=…, weakref_slot: bool=…, str: bool=…, auto_attribs: bool=…, kw_only: bool=…, cache_hash: bool=…, auto_exc: bool=…, eq: Optional[bool]=…, order: Optional[bool]=…, auto_detect: bool=…, collect_by_mro: bool=…… - added:
export setters - added:
field Attribute.on_setattr: _OnSetAttrType - added:
function define(maybe_cls: _C, *, these: Optional[Dict[str, Any]]=…, repr: bool=…, hash: Optional[bool]=…, init: bool=…, slots: bool=…, frozen: bool=…, weakref_slot: bool=…, str: bool=…, auto_attribs: bool=…, kw_only: bool=…, cache_hash: bool=…, auto_exc: bool=…, eq: Optional[bool]=…, order: Optional[bool]=…, auto_detect: bool=…, getstate_setstate: Optional[bool]=…, on_setattr: Optional[_OnSetAtt… - added:
function field(*, default: None=…, validator: None=…, repr: _ReprArgType=…, hash: Optional[bool]=…, init: bool=…, metadata: Optional[Mapping[Any, Any]]=…, converter: None=…, factory: None=…, kw_only: bool=…, eq: Optional[bool]=…, order: Optional[bool]=…, on_setattr: Optional[_OnSetAttrArgType]=…) -> Any | (*, default: None=…, validator: Optional[_ValidatorArgType[_T]]=…, repr: _ReprArgType=…, has… - added:
function resolve_types(cls: _C, globalns: Optional[Dict[str, Any]]=…, localns: Optional[Dict[str, Any]]=…) -> _C - added:
variable frozen - added:
variable mutable
- changed:
function default_if_none(default: _T) -> _ConverterType[_T] | (*, factory: Callable[[], _T]) -> _ConverterType[_T] → function default_if_none(default: _T) -> _ConverterType | (*, factory: Callable[[], _T]) -> _ConverterType - changed:
function optional(converter: _ConverterType[_T]) -> _ConverterType[Optional[_T]] → function optional(converter: _ConverterType) -> _ConverterType - added:
function pipe(*validators: _ConverterType) -> _ConverterType
- removed:
field FrozenInstanceError.msg: str - changed:
class FrozenInstanceError(AttributeError) → class FrozenInstanceError(FrozenError) - added:
class FrozenAttributeError(FrozenError) - added:
class FrozenError(AttributeError) - added:
field FrozenError.msg: str
- added:
function convert(instance: Any, attribute: Attribute[Any], new_value: Any) -> Any - added:
function frozen(instance: Any, attribute: Attribute, new_value: Any) -> NoReturn - added:
function pipe(*setters: _OnSetAttrType) -> _OnSetAttrType - added:
function validate(instance: Any, attribute: Attribute[_T], new_value: _T) -> _T - added:
variable NO_OP: _NoOpType