Update dependency attrs to v18.2.0
This MR contains the following updates:
Package | Update | Change |
---|---|---|
attrs (changelog) | minor |
==18.1.0 -> ==18.2.0
|
⚠ Dependency Lookup Warnings ⚠
Warnings were logged while processing this repo. Please check the logs for more information.
Release Notes
python-attrs/attrs
v18.2.0
Deprecations
-
Comparing subclasses using
<
,>
,<=
, and>=
is now deprecated. The docs always claimed that instances are only compared if the types are identical, so this is a first step to conform to the docs.Equality operators (
==
and!=
) were always strict in this regard. #394
Changes
-
attrs
now ships its own PEP 484 type hints. Together with mypy'sattrs
plugin, you've got all you need for writing statically typed code in both Python 2 and 3!At that occasion, we've also added narrative docs about type annotations in
attrs
. #238 -
Added kw_only arguments to
attr.ib
andattr.s
, and a corresponding kw_only attribute toattr.Attribute
. This change makes it possible to have a generated__init__
with keyword-only arguments on Python 3, relaxing the required ordering of default and non-default valued attributes. #281, #411 -
The test suite now runs with
hypothesis.HealthCheck.too_slow
disabled to prevent CI breakage on slower computers. #364, #396 -
attr.validators.in_()
now raises aValueError
with a useful message even if the options are a string and the value is not a string. #383 -
attr.asdict()
now properly handles deeply nested lists and dictionaries. #395 -
Added
attr.converters.default_if_none()
that allows to replaceNone
values in attributes. For exampleattr.ib(converter=default_if_none(""))
replacesNone
by empty strings. #400, #414 -
Fixed a reference leak where the original class would remain live after being replaced when
slots=True
is set. #407 -
Slotted classes can now be made weakly referenceable by passing
@attr.s(weakref_slot=True)
. #420 -
Added cache_hash option to
@attr.s
which causes the hash code to be computed once and stored on the object. #426 -
Attributes can be named
property
anditemgetter
now. #430 -
It is now possible to override a base class' class variable using only class annotations. #431
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.