Skip to content

Upgrading attrs 17 to 18

Unknown17.4.0 → 18.2.0

Fetching 2 releases from GitHub…0 / 2
UnknownUpgrade verdict

DepDelta is still reading the notes for this range, so breaking changes can't be ruled out yet.

  • 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.
Still reading release notes

DepDelta is still reading the release notes in this range. This updates as they come in.

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • removed: export Attribute
  • removed: export Factory
  • removed: export NOTHING
  • removed: export asdict
  • removed: export assoc
  • removed: export astuple
  • removed: export attrib
  • removed: export attrs
  • removed: export evolve
  • removed: export fields
  • removed: export get_run_validators
  • removed: export has
  • removed: export make_class
  • removed: export set_run_validators
  • removed: export validate
  • added: class Attribute(Generic[_T])
  • added: field Attribute.cmp: bool
  • added: field Attribute.converter: Optional[_ConverterType[_T]]
  • added: field Attribute.default: Optional[_T]
  • added: field Attribute.hash: Optional[bool]
  • added: field Attribute.init: bool
  • added: field Attribute.kw_only: bool
  • added: field Attribute.metadata: Dict[Any, Any]
  • added: field Attribute.name: str
  • added: field Attribute.repr: bool
  • added: field Attribute.type: Optional[Type[_T]]
  • added: field Attribute.validator: Optional[_ValidatorType[_T]]
  • added: function Factory(factory: Callable[[], _T]) -> _T | (factory: Union[Callable[[Any], _T], Callable[[], _T]], takes_self: bool=…) -> _T
  • added: function asdict(inst: Any, recurse: bool=…, filter: Optional[_FilterType]=…, dict_factory: Type[Mapping[Any, Any]]=…, retain_collection_types: bool=…) -> Dict[str, Any]
  • added: function assoc(inst: _T, **changes: Any) -> _T
  • added: function astuple(inst: Any, recurse: bool=…, filter: Optional[_FilterType]=…, tuple_factory: Type[Sequence]=…, retain_collection_types: bool=…) -> Tuple[Any, ...]
  • added: function attrib(default: None=…, validator: None=…, repr: bool=…, cmp: bool=…, hash: Optional[bool]=…, init: bool=…, convert: None=…, metadata: Optional[Mapping[Any, Any]]=…, type: None=…, converter: None=…, factory: None=…, kw_only: bool=…) -> Any | (default: None=…, validator: Optional[_ValidatorArgType[_T]]=…, repr: bool=…, cmp: bool=…, hash: Optional[bool]=…, init: bool=…, convert: Optional[_…
  • added: function attrs(maybe_cls: _C, these: Optional[Dict[str, Any]]=…, repr_ns: Optional[str]=…, repr: bool=…, cmp: bool=…, hash: Optional[bool]=…, init: bool=…, slots: bool=…, frozen: bool=…, weakref_slot: bool=…, str: bool=…, auto_attribs: bool=…, kw_only: bool=…, cache_hash: bool=…) -> _C | (maybe_cls: None=…, these: Optional[Dict[str, Any]]=…, repr_ns: Optional[str]=…, repr: bool=…, cmp: bool=…, ha…
  • added: function evolve(inst: _T, **changes: Any) -> _T
  • added: function fields(cls: type) -> _Fields
  • added: function fields_dict(cls: type) -> Dict[str, Attribute]
  • added: function get_run_validators() -> bool
  • added: function has(cls: type) -> bool
  • added: function make_class(name: str, attrs: Union[List[str], Tuple[str, ...], Dict[str, Any]], bases: Tuple[type, ...]=…, repr_ns: Optional[str]=…, repr: bool=…, cmp: bool=…, hash: Optional[bool]=…, init: bool=…, slots: bool=…, frozen: bool=…, weakref_slot: bool=…, str: bool=…, auto_attribs: bool=…, kw_only: bool=…, cache_hash: bool=…) -> type
  • added: function set_run_validators(run: bool) -> None
  • added: function validate(inst: Any) -> None
  • added: variable NOTHING: object
  • added: variable dataclass
  • changed: function optional(converter) → function optional(converter: _ConverterType[_T]) -> _ConverterType[Optional[_T]]
  • added: function default_if_none(default: _T) -> _ConverterType[_T] | (*, factory: Callable[[], _T]) -> _ConverterType[_T]
  • removed: field FrozenInstanceError.args
  • changed: field FrozenInstanceError.msg → field FrozenInstanceError.msg: str
  • changed: function exclude(*what) → function exclude(*what: Union[type, Attribute]) -> _FilterType
  • changed: function include(*what) → function include(*what: Union[type, Attribute]) -> _FilterType
  • removed: export and_
  • changed: function in_(options) → function in_(options: Container[_T]) -> _ValidatorType[_T]
  • changed: function instance_of(type) → function instance_of(type: Union[Tuple[Type[_T], ...], Type[_T]]) -> _ValidatorType[_T]
  • changed: function optional(validator) → function optional(validator: Union[_ValidatorType[_T], List[_ValidatorType[_T]]]) -> _ValidatorType[Optional[_T]]
  • changed: function provides(interface) → function provides(interface: Any) -> _ValidatorType[Any]
  • added: function and_(*validators: _ValidatorType[_T]) -> _ValidatorType[_T]