You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are new versions of attrs available from pypi.
18.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's attrs 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 and attr.s, and a
corresponding kw_only attribute to attr.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 a ValueError 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 replace None values in attributes. For example attr.ib(converter=default_if_none("")) replaces None 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. #425
Attributes can be named property and itemgetter now. #430
It is now possible to override a base class' class variable using
only class annotations. #431
It's the spiritual successor of characteristic and aspires to
fix some of it clunkiness and unfortunate decisions. Both were inspired
by Twisted's FancyEqMixin
but both are implemented using class decorators because subclassing is
bad for you, m'kay?
The text was updated successfully, but these errors were encountered:
There are new versions of attrs available from pypi.
18.2.0
Deprecations
Comparing subclasses using
<
,>
,<=
, and>=
is nowdeprecated. 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 thisregard. #394
Changes
attrs
now ships its own PEP484 type hints. Together
with mypy's
attrs
plugin, you've got allyou 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 acorresponding kw_only attribute to
attr.Attribute
. This changemakes it possible to have a generated
__init__
with keyword-onlyarguments 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 usefulmessage even if the options are a string and the value is not a
string. #383
attr.asdict()
now properly handles deeply nested lists anddictionaries.
#395
Added
attr.converters.default_if_none()
that allows to replaceNone
values in attributes. For exampleattr.ib(converter=default_if_none(""))
replacesNone
by emptystrings. #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 codeto be computed once and stored on the object.
#425
Attributes can be named
property
anditemgetter
now.#430
It is now possible to override a base class' class variable using
only class annotations.
#431
Full changelog.
Credits
attrs
is written and maintained by HynekSchlawack.
The development is kindly supported by Variomedia
AG.
A full list of contributors can be found in GitHub's
overview.
It's the spiritual successor of
characteristic and aspires to
fix some of it clunkiness and unfortunate decisions. Both were inspired
by Twisted's
FancyEqMixin
but both are implemented using class decorators because subclassing is
bad for you, m'kay?
The text was updated successfully, but these errors were encountered: