Skip to content

Commit 4f74fba

Browse files
committed
Prepare 20.2.0
1 parent 74605de commit 4f74fba

File tree

9 files changed

+41
-27
lines changed

9 files changed

+41
-27
lines changed

CHANGELOG.rst

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,50 @@ Changelog
44
Versions follow `CalVer <https://calver.org>`_ with a strict backwards compatibility policy.
55
The third digit is only for regressions.
66

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
88
9-
..
10-
Do *NOT* add changelog entries here!
9+
20.2.0 (2020-09-05)
10+
-------------------
1111

12-
This changelog is managed by towncrier and is compiled at release time.
12+
Backward-incompatible Changes
13+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1314

14-
See https://www.attrs.org/en/latest/contributing.html#changelog for details.
15+
- ``attr.define()``, ``attr.frozen()``, ``attr.mutable()``, and ``attr.field()`` remain **provisional**.
16+
17+
This release fixes a bunch of bugs and ergonomics but they remain mostly unchanged.
18+
19+
If you wish to use them together with mypy, you can simply drop `this plugin <https://gist.github.com/hynek/1e3844d0c99e479e716169034b5fa963#file-attrs_ng_plugin-py>`_ into your project.
20+
21+
Feel free to provide feedback to them in the linked issue #668.
22+
23+
We will release the ``attrs`` namespace once we have the feeling that the APIs have properly settled.
24+
`#668 <https://github.com/python-attrs/attrs/issues/668>`_
25+
26+
27+
Changes
28+
^^^^^^^
29+
30+
- ``attr.define()`` et al now correct detect ``__eq__`` and ``__ne__``.
31+
`#671 <https://github.com/python-attrs/attrs/issues/671>`_
32+
- ``attr.define()`` et al's hybrid behavior now also works correctly when arguments are passed.
33+
`#675 <https://github.com/python-attrs/attrs/issues/675>`_
34+
- It's possible to define custom ``__setattr__`` methods on slotted classes again.
35+
`#681 <https://github.com/python-attrs/attrs/issues/681>`_
36+
- In 20.1.0 we introduced the ``inherited`` attribute on the ``attr.Attribute`` class to differentiate attributes that have been inherited and those that have been defined directly on the class.
37+
38+
It has shown to be problematic to involve that attribute when comparing instances of ``attr.Attribute`` though, because when sub-classing, attributes from base classes are suddenly not equal to themselves in a super class.
39+
40+
Therefore the ``inherited`` attribute will now be ignored when hashing and comparing instances of ``attr.Attribute``.
41+
`#684 <https://github.com/python-attrs/attrs/issues/684>`_
42+
- ``zope.interface`` is now a "soft dependency" when running the test suite; if ``zope.interface`` is not installed when running the test suite, the interface-related tests will be automatically skipped.
43+
`#685 <https://github.com/python-attrs/attrs/issues/685>`_
44+
- The ergonomics of creating frozen classes using ``@define(frozen=True)`` and sub-classing frozen classes has been improved:
45+
you don't have to set ``on_setattr=None`` anymore.
46+
`#687 <https://github.com/python-attrs/attrs/issues/687>`_
47+
48+
49+
----
1550

16-
.. towncrier release notes start
1751

1852
20.1.0 (2020-08-20)
1953
-------------------

changelog.d/668.breaking.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

changelog.d/671.change.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog.d/675.change.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog.d/681.change.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog.d/684.change.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

changelog.d/685.change.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog.d/687.change.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/attr/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from ._version_info import VersionInfo
2222

2323

24-
__version__ = "20.2.0.dev0"
24+
__version__ = "20.2.0"
2525
__version_info__ = VersionInfo._from_version_string(__version__)
2626

2727
__title__ = "attrs"

0 commit comments

Comments
 (0)