From 9e443b18527dc96b194e92805fa751cbf8434ba9 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Sun, 31 Dec 2023 07:20:03 +0100 Subject: [PATCH] Prepare 23.2.0 --- CHANGELOG.md | 26 ++++++++++++++++++++------ changelog.d/1141.change.md | 1 - changelog.d/1158.change.md | 1 - changelog.d/1165.change.md | 1 - changelog.d/1172.change.md | 2 -- changelog.d/1187.change.md | 2 -- changelog.d/1200.change.md | 1 - changelog.d/1203.change.md | 2 -- 8 files changed, 20 insertions(+), 16 deletions(-) delete mode 100644 changelog.d/1141.change.md delete mode 100644 changelog.d/1158.change.md delete mode 100644 changelog.d/1165.change.md delete mode 100644 changelog.d/1172.change.md delete mode 100644 changelog.d/1187.change.md delete mode 100644 changelog.d/1200.change.md delete mode 100644 changelog.d/1203.change.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 6602411e..a768197a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,15 +10,29 @@ You can find out backwards-compatibility policy [here](https://github.com/python Changes for the upcoming release can be found in the ["changelog.d" directory](https://github.com/python-attrs/attrs/tree/main/changelog.d) in our repository. - -This changelog is managed by towncrier and is compiled at release time. +## [23.2.0](https://github.com/python-attrs/attrs/tree/23.2.0) - 2023-12-31 -See https://github.com/python-attrs/attrs/blob/main/.github/CONTRIBUTING.md#changelog for details. ---> +### Changes - +- The type annotation for `attrs.resolve_types()` is now correct. + [#1141](https://github.com/python-attrs/attrs/issues/1141) +- Type stubs now use `typing.dataclass_transform` to decorate dataclass-like decorators, instead of the non-standard `__dataclass_transform__` special form, which is only supported by Pyright. + [#1158](https://github.com/python-attrs/attrs/issues/1158) +- Fixed serialization of namedtuple fields using `attrs.asdict/astuple()` with `retain_collection_types=True`. + [#1165](https://github.com/python-attrs/attrs/issues/1165) +- `attrs.AttrsInstance` is now a `typing.Protocol` in both type hints and code. + This allows you to subclass it along with another `Protocol`. + [#1172](https://github.com/python-attrs/attrs/issues/1172) +- If *attrs* detects that `__attrs_pre_init__` accepts more than just `self`, it will call it with the same arguments as `__init__` was called. + This allows you to, for example, pass arguments to `super().__init__()`. + [#1187](https://github.com/python-attrs/attrs/issues/1187) +- Slotted classes now transform `functools.cached_property` decorated methods to support equivalent semantics. + [#1200](https://github.com/python-attrs/attrs/issues/1200) +- Added *class_body* argument to `attrs.make_class()` to provide additional attributes for newly created classes. + It is, for example, now possible to attach methods. + [#1203](https://github.com/python-attrs/attrs/issues/1203) ## [23.1.0](https://github.com/python-attrs/attrs/tree/23.1.0) - 2023-04-16 diff --git a/changelog.d/1141.change.md b/changelog.d/1141.change.md deleted file mode 100644 index 8112504c..00000000 --- a/changelog.d/1141.change.md +++ /dev/null @@ -1 +0,0 @@ -The type annotation for `attrs.resolve_types()` is now correct. diff --git a/changelog.d/1158.change.md b/changelog.d/1158.change.md deleted file mode 100644 index 044d53b2..00000000 --- a/changelog.d/1158.change.md +++ /dev/null @@ -1 +0,0 @@ -Type stubs now use `typing.dataclass_transform` to decorate dataclass-like decorators, instead of the non-standard `__dataclass_transform__` special form, which is only supported by Pyright. diff --git a/changelog.d/1165.change.md b/changelog.d/1165.change.md deleted file mode 100644 index fb99d3a9..00000000 --- a/changelog.d/1165.change.md +++ /dev/null @@ -1 +0,0 @@ -Fixed serialization of namedtuple fields using `attrs.asdict/astuple()` with `retain_collection_types=True`. diff --git a/changelog.d/1172.change.md b/changelog.d/1172.change.md deleted file mode 100644 index e3a7b0c2..00000000 --- a/changelog.d/1172.change.md +++ /dev/null @@ -1,2 +0,0 @@ -`attrs.AttrsInstance` is now a `typing.Protocol` in both type hints and code. -This allows you to subclass it along with another `Protocol`. diff --git a/changelog.d/1187.change.md b/changelog.d/1187.change.md deleted file mode 100644 index b06f115a..00000000 --- a/changelog.d/1187.change.md +++ /dev/null @@ -1,2 +0,0 @@ -If *attrs* detects that `__attrs_pre_init__` accepts more than just `self`, it will call it with the same arguments as `__init__` was called. -This allows you to, for example, pass arguments to `super().__init__()`. diff --git a/changelog.d/1200.change.md b/changelog.d/1200.change.md deleted file mode 100644 index 402252bb..00000000 --- a/changelog.d/1200.change.md +++ /dev/null @@ -1 +0,0 @@ -Slotted classes now transform `functools.cached_property` decorated methods to support equivalent semantics. diff --git a/changelog.d/1203.change.md b/changelog.d/1203.change.md deleted file mode 100644 index 38c5c9f8..00000000 --- a/changelog.d/1203.change.md +++ /dev/null @@ -1,2 +0,0 @@ -Added *class_body* argument to `attrs.make_class()` to provide additional attributes for newly created classes. -It is, for example, now possible to attach methods.