From 0356f0603eb5d8d4e7bae132ab80847fff4abcfc Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Sun, 3 Mar 2019 09:31:44 +0100 Subject: [PATCH] Prepare 19.1.0 --- CHANGELOG.rst | 52 +++++++++++++++++++++++++++++------- changelog.d/425.change.rst | 11 -------- changelog.d/443.change.rst | 1 - changelog.d/450.change.rst | 1 - changelog.d/482.breaking.rst | 4 --- changelog.d/500.change.rst | 3 --- changelog.d/503.change.rst | 1 - src/attr/__init__.py | 2 +- 8 files changed, 44 insertions(+), 31 deletions(-) delete mode 100644 changelog.d/425.change.rst delete mode 100644 changelog.d/443.change.rst delete mode 100644 changelog.d/450.change.rst delete mode 100644 changelog.d/482.breaking.rst delete mode 100644 changelog.d/500.change.rst delete mode 100644 changelog.d/503.change.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e72d5065..1bcfb431 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,17 +4,51 @@ Changelog Versions follow `CalVer `_ with a strict backwards compatibility policy. The third digit is only for regressions. -Changes for the upcoming release can be found in the `"changelog.d" directory `_ in our repository. - -.. - Do *NOT* add changelog entries here! - - This changelog is managed by towncrier and is compiled at release time. - - See https://www.attrs.org/en/latest/contributing.html#changelog for details. - .. towncrier release notes start +19.1.0 (2019-03-03) +------------------- + +Backward-incompatible Changes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- Fixed a bug where deserialized objects with ``cache_hash=True`` could have incorrect hash code values. + This change breaks classes with ``cache_hash=True`` when a custom ``__setstate__`` is present. + An exception will be thrown when applying the ``attrs`` annotation to such a class. + This limitation is tracked in issue `#494 `_. + `#482 `_ + + +Changes +^^^^^^^ + +- Add ``is_callable``, ``deep_iterable``, and ``deep_mapping`` validators. + + * ``is_callable``: validates that a value is callable + * ``deep_iterable``: Allows recursion down into an iterable, + applying another validator to every member in the iterable + as well as applying an optional validator to the iterable itself. + * ``deep_mapping``: Allows recursion down into the items in a mapping object, + applying a key validator and a value validator to the key and value in every item. + Also applies an optional validator to the mapping object itself. + + You can find them in the ``attr.validators`` package. + `#425 `_ +- Fixed stub files to prevent errors raised by mypy's ``disallow_any_generics = True`` option. + `#443 `_ +- Attributes with ``init=False`` now can follow after ``kw_only=True`` attributes. + `#450 `_ +- ``attrs`` now has first class support for defining exception classes. + + 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. + `#500 `_ +- Clarified documentation for hashing to warn that hashable objects should be deeply immutable (in their usage, even if this is not enforced). + `#503 `_ + + +---- + + 18.2.0 (2018-09-01) ------------------- diff --git a/changelog.d/425.change.rst b/changelog.d/425.change.rst deleted file mode 100644 index d6229303..00000000 --- a/changelog.d/425.change.rst +++ /dev/null @@ -1,11 +0,0 @@ -Add ``is_callable``, ``deep_iterable``, and ``deep_mapping`` validators. - -* ``is_callable``: validates that a value is callable -* ``deep_iterable``: Allows recursion down into an iterable, - applying another validator to every member in the iterable - as well as applying an optional validator to the iterable itself. -* ``deep_mapping``: Allows recursion down into the items in a mapping object, - applying a key validator and a value validator to the key and value in every item. - Also applies an optional validator to the mapping object itself. - -You can find them in the ``attr.validators`` package. diff --git a/changelog.d/443.change.rst b/changelog.d/443.change.rst deleted file mode 100644 index 3ac0e791..00000000 --- a/changelog.d/443.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed stub files to prevent errors raised by mypy's ``disallow_any_generics = True`` option. diff --git a/changelog.d/450.change.rst b/changelog.d/450.change.rst deleted file mode 100644 index 131d92bb..00000000 --- a/changelog.d/450.change.rst +++ /dev/null @@ -1 +0,0 @@ -Attributes with ``init=False`` now can follow after ``kw_only=True`` attributes. diff --git a/changelog.d/482.breaking.rst b/changelog.d/482.breaking.rst deleted file mode 100644 index 694b714b..00000000 --- a/changelog.d/482.breaking.rst +++ /dev/null @@ -1,4 +0,0 @@ -Fixed a bug where deserialized objects with ``cache_hash=True`` could have incorrect hash code values. -This change breaks classes with ``cache_hash=True`` when a custom ``__setstate__`` is present. -An exception will be thrown when applying the ``attrs`` annotation to such a class. -This limitation is tracked in issue `#494 `_. diff --git a/changelog.d/500.change.rst b/changelog.d/500.change.rst deleted file mode 100644 index c1a64023..00000000 --- a/changelog.d/500.change.rst +++ /dev/null @@ -1,3 +0,0 @@ -``attrs`` now has first class support for defining exception classes. - -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. diff --git a/changelog.d/503.change.rst b/changelog.d/503.change.rst deleted file mode 100644 index 3b064fec..00000000 --- a/changelog.d/503.change.rst +++ /dev/null @@ -1 +0,0 @@ -Clarified documentation for hashing to warn that hashable objects should be deeply immutable (in their usage, even if this is not enforced). diff --git a/src/attr/__init__.py b/src/attr/__init__.py index 731d6354..0ebe5197 100644 --- a/src/attr/__init__.py +++ b/src/attr/__init__.py @@ -18,7 +18,7 @@ from ._make import ( ) -__version__ = "19.1.0.dev0" +__version__ = "19.1.0" __title__ = "attrs" __description__ = "Classes Without Boilerplate"