Skip to content

Commit 0356f06

Browse files
committed
Prepare 19.1.0
1 parent 8b83ef7 commit 0356f06

8 files changed

Lines changed: 41 additions & 28 deletions

File tree

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+
19.1.0 (2019-03-03)
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+
- Fixed a bug where deserialized objects with ``cache_hash=True`` could have incorrect hash code values.
16+
This change breaks classes with ``cache_hash=True`` when a custom ``__setstate__`` is present.
17+
An exception will be thrown when applying the ``attrs`` annotation to such a class.
18+
This limitation is tracked in issue `#494 <https://github.com/python-attrs/attrs/issues/494>`_.
19+
`#482 <https://github.com/python-attrs/attrs/issues/482>`_
20+
21+
22+
Changes
23+
^^^^^^^
24+
25+
- Add ``is_callable``, ``deep_iterable``, and ``deep_mapping`` validators.
26+
27+
* ``is_callable``: validates that a value is callable
28+
* ``deep_iterable``: Allows recursion down into an iterable,
29+
applying another validator to every member in the iterable
30+
as well as applying an optional validator to the iterable itself.
31+
* ``deep_mapping``: Allows recursion down into the items in a mapping object,
32+
applying a key validator and a value validator to the key and value in every item.
33+
Also applies an optional validator to the mapping object itself.
34+
35+
You can find them in the ``attr.validators`` package.
36+
`#425 <https://github.com/python-attrs/attrs/issues/425>`_
37+
- Fixed stub files to prevent errors raised by mypy's ``disallow_any_generics = True`` option.
38+
`#443 <https://github.com/python-attrs/attrs/issues/443>`_
39+
- Attributes with ``init=False`` now can follow after ``kw_only=True`` attributes.
40+
`#450 <https://github.com/python-attrs/attrs/issues/450>`_
41+
- ``attrs`` now has first class support for defining exception classes.
42+
43+
If you define a class using ``@attr.s(auto_exc=True)`` and subclass an exception, the class will behave like a well-behaved exception class including an appropriate ``__str__`` method, and all attributes additionally available in an ``args`` attribute.
44+
`#500 <https://github.com/python-attrs/attrs/issues/500>`_
45+
- Clarified documentation for hashing to warn that hashable objects should be deeply immutable (in their usage, even if this is not enforced).
46+
`#503 <https://github.com/python-attrs/attrs/issues/503>`_
47+
48+
49+
----
1550

16-
.. towncrier release notes start
1751

1852
18.2.0 (2018-09-01)
1953
-------------------

changelog.d/425.change.rst

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

changelog.d/443.change.rst

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

changelog.d/450.change.rst

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

changelog.d/482.breaking.rst

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

changelog.d/500.change.rst

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

changelog.d/503.change.rst

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

src/attr/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
)
1919

2020

21-
__version__ = "19.1.0.dev0"
21+
__version__ = "19.1.0"
2222

2323
__title__ = "attrs"
2424
__description__ = "Classes Without Boilerplate"

0 commit comments

Comments
 (0)