Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attrs versions available: 18.2.0 #316

Closed
dependencies bot opened this issue Sep 2, 2018 · 0 comments
Closed

attrs versions available: 18.2.0 #316

dependencies bot opened this issue Sep 2, 2018 · 0 comments

Comments

@dependencies
Copy link

dependencies bot commented Sep 2, 2018

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

Full changelog.

Credits

attrs is written and maintained by Hynek
Schlawack
.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants