Skip to content

Commit

Permalink
Merge branch 'main' into import-attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Dec 16, 2021
2 parents c0c20f6 + de0f013 commit d4dff90
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.rst
@@ -1,8 +1,11 @@
Changelog
=========

Versions follow `CalVer <https://calver.org>`_ with a strict backwards compatibility policy.
The third digit is only for regressions.
Versions follow `CalVer <https://calver.org>`_ with a strict backwards-compatibility policy.

The **first digit** of the version is the year.
The **second digit** is incremented with each release, starting at 1 for each year.
The **third digit** is when we need to start branches for older releases (only for emergencies).

Put simply, you shouldn't ever be afraid to upgrade ``attrs`` if you're only using its public APIs.
Whenever there is a need to break compatibility, it is announced here in the changelog, and raises a ``DeprecationWarning`` for a year (if possible) before it's finally really broken.
Expand Down
14 changes: 11 additions & 3 deletions README.rst
Expand Up @@ -15,9 +15,6 @@
<a href="https://pypi.org/project/attrs/">
<img src="https://img.shields.io/pypi/v/attrs" />
</a>
<a href="https://pepy.tech/project/attrs">
<img src="https://static.pepy.tech/personalized-badge/attrs?period=month&units=international_system&left_color=grey&right_color=blue&left_text=Downloads%20/%20Month" alt="Downloads per month" />
</a>
</p>

.. teaser-begin
Expand Down Expand Up @@ -90,6 +87,17 @@ The classic APIs (``@attr.s``, ``attr.ib``, ``@attr.attrs``, ``attr.attrib``, an

Please check out `On The Core API Names <https://www.attrs.org/en/latest/names.html>`_ for a more in-depth explanation.


Data Classes
============

On the tin, ``attrs`` might remind you of ``dataclasses`` (and indeed, ``dataclasses`` are a descendant of ``attrs``).
In practice it does a lot more more and is more flexible.
For instance it allows you to define `special handling of NumPy arrays for equality checks <https://www.attrs.org/en/stable/comparison.html#customization>`_, or allows more ways to `plug into the initialization process <https://www.attrs.org/en/stable/init.html#hooking-yourself-into-initialization>`_.

For more details, please refer to our `comparison page <https://www.attrs.org/en/stable/why.html#data-classes>`_.


.. -getting-help-
Getting Help
Expand Down

0 comments on commit d4dff90

Please sign in to comment.