attrs: Attributes without boilerplate.

Edit Package python-attrs

Python package with class decorators that ease the chores of implementing the most common attribute-related object protocols.

You just specify the attributes to work with and attrs gives you:

a nice human-readable __repr__,
a complete set of comparison methods,
an initializer,
and much more

without writing dull boilerplate code again and again.

This gives you the power to use actual classes with actual types in your code instead of confusing tuples or confusingly behaving namedtuples.

So put down that type-less data structures and welcome some class into your life!

python-attrs is the successor to python-characterstic

Refresh
Refresh
Source Files
Filename Size Changed
_multibuild 0000000053 53 Bytes
attrs-19.3.0.tar.gz 0000132477 129 KB
python-attrs.changes 0000022124 21.6 KB
python-attrs.spec 0000002747 2.68 KB
Revision 11 (latest revision is 24)
Dominique Leuenberger's avatar Dominique Leuenberger (dimstar_suse) accepted request 741439 from Ondřej Súkup's avatar Ondřej Súkup (mimi_vx) (revision 11)
- update to 19.3.0
 * Fixed auto_attribs usage when default values cannot be compared directly
     with ==, such as numpy arrays.

- update to version 19.2.0:
  * Backward-incompatible Changes
    + Removed deprecated "Attribute" attribute "convert" per scheduled
      removal on 2019/1.  This planned deprecation is tracked in issue
      `#307 <https://github.com/python-attrs/attrs/issues/307>`_.
      `#504 <https://github.com/python-attrs/attrs/issues/504>`_
    + "__lt__", "__le__", "__gt__", and "__ge__" do not consider
      subclasses comparable anymore.  This has been deprecated since
      18.2.0 and was raising a "DeprecationWarning" for over a year.
      `#570 <https://github.com/python-attrs/attrs/issues/570>`_
  * Deprecations
    + The "cmp" argument to "attr.s()" and "attr.ib()" is now
      deprecated.  Please use "eq" to add equality methods ("__eq__"
      and "__ne__") and "order" to add ordering methods ("__lt__",
      "__le__", "__gt__", and "__ge__") instead – just like with
      `dataclasses
      <https://docs.python.org/3/library/dataclasses.html>`_.  Both
      are effectively "True" by default but it's enough to set
      "eq=False" to disable both at once.  Passing "eq=False,
      order=True" explicitly will raise a "ValueError" though.  Since
      this is arguably a deeper backward-compatibility break, it will
      have an extended deprecation period until 2021-06-01.  After
      that day, the "cmp" argument will be removed.  "attr.Attribute"
      also isn't orderable anymore.  `#574
      <https://github.com/python-attrs/attrs/issues/574>`_
  * Changes
Comments 0
openSUSE Build Service is sponsored by