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
Copy file name to clipboardExpand all lines: CHANGELOG.rst
+106-6Lines changed: 106 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,116 @@ Changelog
4
4
Versions follow `CalVer <https://calver.org>`_ with a strict backwards compatibility policy.
5
5
The third digit is only for regressions.
6
6
7
-
Changes for the upcoming release can be found in the `"changelog.d" directory <https://github.com/python-attrs/attrs/tree/master/changelog.d>`_ in our repository.
7
+
.. towncrier release notes start
8
8
9
-
..
10
-
Do *NOT* add changelog entries here!
9
+
20.1.0 (2020-08-20)
10
+
-------------------
11
11
12
-
This changelog is managed by towncrier and is compiled at release time.
12
+
Backward-incompatible Changes
13
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13
14
14
-
See https://www.attrs.org/en/latest/contributing.html#changelog for details.
15
+
- Python 3.4 is not supported anymore.
16
+
It has been unsupported by the Python core team for a while now, its PyPI downloads are negligible, and our CI provider removed it as a supported option.
17
+
18
+
It's very unlikely that ``attrs`` will break under 3.4 anytime soon, which is why we do *not* block its installation on Python 3.4.
19
+
But we don't test it anymore and will block it once someone reports breakage.
- Added ``@attr.s(collect_by_mro=False)`` argument that if set to ``True`` fixes the collection of attributes from base classes.
51
+
52
+
It's only necessary for certain cases of multiple-inheritance but is kept off for now for backward-compatibility reasons.
53
+
It will be turned on by default in the future.
54
+
55
+
As a side-effect, ``attr.Attribute`` now *always* has an ``inherited`` attribute indicating whether an attribute on a class was directly defined or inherited.
- It is now possible to prevent ``attrs`` from auto-generating the ``__setstate__`` and ``__getstate__`` methods that are required for pickling of slotted classes.
61
+
62
+
Either pass ``@attr.s(getstate_setstate=False)`` or pass ``@attr.s(auto_detect=True)`` and implement them yourself:
63
+
if ``attrs`` finds either of the two methods directly on the decorated class, it assumes implicitly ``getstate_setstate=False`` (and implements neither).
64
+
65
+
This option works with dict classes but should never be necessary.
- ``attrs`` can now automatically detect your own implementations and infer ``init=False``, ``repr=False``, ``eq=False``, ``order=False``, and ``hash=False`` if you set ``@attr.s(auto_detect=True)``.
72
+
``attrs`` will ignore inherited methods.
73
+
If the argument implies more than one method (e.g. ``eq=True`` creates both ``__eq__`` and ``__ne__``), it's enough for *one* of them to exist and ``attrs`` will create *neither*.
- It is now possible to specify hooks that are called whenever an attribute is set **after** a class has been instantiated.
92
+
93
+
You can pass ``on_setattr`` both to ``@attr.s()`` to set the default for all attributes on a class, and to ``@attr.ib()`` to overwrite it for individual attributes.
94
+
95
+
``attrs`` also comes with a new module ``attr.setters`` that brings helpers that run validators, converters, or allow to freeze a subset of attributes.
0 commit comments