All Versions
26
Latest Version
Avg Release Cycle
105 days
Latest Release
668 days ago

Changelog History
Page 3

  • v16.2.0 Changes

    September 17, 2016

    ๐Ÿ”„ Changes: ^

    • โž• Added attr.astuple() that -- similarly to attr.asdict() -- returns the instance as a tuple. #77 <https://github.com/python-attrs/attrs/issues/77>_
    • Converters now work with frozen classes. #76 <https://github.com/python-attrs/attrs/issues/76>_
    • Instantiation of attrs classes with converters is now significantly faster. #80 <https://github.com/python-attrs/attrs/pull/80>_
    • Pickling now works with slotted classes. #81 <https://github.com/python-attrs/attrs/issues/81>_
    • attr.assoc() now works with slotted classes. #84 <https://github.com/python-attrs/attrs/issues/84>_
    • The tuple returned by attr.fields() now also allows to access the Attribute instances by name. Yes, we've subclassed tuple so you don't have to! Therefore attr.fields(C).x is equivalent to the deprecated C.x and works with slotted classes. #88 <https://github.com/python-attrs/attrs/issues/88>_

  • v16.1.0 Changes

    August 30, 2016

    Backward-incompatible Changes:

    • All instances where function arguments were called cl have been changed to the more Pythonic cls. Since it was always the first argument, it's doubtful anyone ever called those function with in the keyword form. If so, sorry for any breakage but there's no practical deprecation path to solve this ugly wart.

    ๐Ÿ—„ Deprecations: ^

    • ๐Ÿ—„ Accessing Attribute instances on class objects is now deprecated and will stop working in 2017. If you need introspection please use the __attrs_attrs__ attribute or the attr.fields() function that carry them too. In the future, the attributes that are defined on the class body and are usually overwritten in your __init__ method are simply removed after @attr.s has been applied.

    This will remove the confusing error message if you write your own __init__ and forget to initialize some attribute. Instead you will get a straightforward AttributeError. In other words: decorated classes will work more like plain Python classes which was always attrs's goal.

    • ๐Ÿ—„ The serious business aliases attr.attributes and attr.attr have been deprecated in favor of attr.attrs and attr.attrib which are much more consistent and frankly obvious in hindsight. They will be purged from documentation immediately but there are no plans to actually remove them.

    ๐Ÿ”„ Changes: ^

    • attr.asdict()\ 's dict_factory arguments is now propagated on recursion. #45 <https://github.com/python-attrs/attrs/issues/45>_
    • attr.asdict(), attr.has() and attr.fields() are significantly faster. #48 <https://github.com/python-attrs/attrs/issues/48>_ #51 <https://github.com/python-attrs/attrs/issues/51>_
    • โž• Add attr.attrs and attr.attrib as a more consistent aliases for attr.s and attr.ib.
    • Add frozen option to attr.s that will make instances best-effort immutable. #60 <https://github.com/python-attrs/attrs/issues/60>_
    • attr.asdict() now takes retain_collection_types as an argument. If True, it does not convert attributes of type tuple or set to list. #69 <https://github.com/python-attrs/attrs/issues/69>_

  • v16.0.0 Changes

    May 23, 2016

    Backward-incompatible Changes:

    • ๐Ÿ‘ Python 3.3 and 2.6 are no longer supported. They may work by chance but any effort to keep them working has ceased.

    The last Python 2.6 release was on October 29, 2013 and is no longer supported by the CPython core team. Major Python packages like Django and Twisted dropped Python 2.6 a while ago already.

    Python 3.3 never had a significant user base and wasn't part of any distribution's LTS release.

    ๐Ÿ”„ Changes: ^

    • __slots__ have arrived! Classes now can automatically be slotted <https://docs.python.org/3/reference/datamodel.html#slots>-style (and save your precious memory) just by passing slots=True. #35 <https://github.com/python-attrs/attrs/issues/35>
    • ๐Ÿ‘ Allow the case of initializing attributes that are set to init=False. This allows for clean initializer parameter lists while being able to initialize attributes to default values. #32 <https://github.com/python-attrs/attrs/issues/32>_
    • attr.asdict() can now produce arbitrary mappings instead of Python dict\ s when provided with a dict_factory argument. #40 <https://github.com/python-attrs/attrs/issues/40>_
    • ๐ŸŽ Multiple performance improvements.

  • v15.2.0 Changes

    December 08, 2015

    ๐Ÿ”„ Changes: ^

    • โž• Added a convert argument to attr.ib, which allows specifying a function to run on arguments. This allows for simple type conversions, e.g. with attr.ib(convert=int). #26 <https://github.com/python-attrs/attrs/issues/26>_
    • Speed up object creation when attribute validators are used. #28 <https://github.com/python-attrs/attrs/issues/28>_

  • v15.1.0 Changes

    August 20, 2015

    ๐Ÿ”„ Changes: ^

    • โž• Added attr.validators.optional() that wraps other validators allowing attributes to be None. #16 <https://github.com/python-attrs/attrs/issues/16>_
    • Multi-level inheritance now works. #24 <https://github.com/python-attrs/attrs/issues/24>_
    • __repr__() now works with non-redecorated subclasses. #20 <https://github.com/python-attrs/attrs/issues/20>_

  • v15.0.0 Changes

    April 15, 2015

    ๐Ÿ”„ Changes: ^

    ๐ŸŽ‰ Initial release.