From 1e2f6f9cac5cc60f0adab051c14adf09ffe39155 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Sun, 16 Apr 2023 12:22:15 +0200 Subject: [PATCH] Prepare 23.1.0 --- CHANGELOG.md | 58 ++++++++++++++++++++++++++++----- changelog.d/1068.change.md | 1 - changelog.d/1079.change.md | 1 - changelog.d/1081.change.md | 1 - changelog.d/1084.change.md | 1 - changelog.d/1085.change.md | 1 - changelog.d/1090.change.md | 1 - changelog.d/1092.change.md | 1 - changelog.d/1099.change.md | 1 - changelog.d/1105.change.md | 1 - changelog.d/1107.change.md | 3 -- changelog.d/1117.change.md | 3 -- changelog.d/1120.deprecation.md | 5 --- changelog.d/1122.change.md | 1 - changelog.d/993.breaking.md | 1 - 15 files changed, 50 insertions(+), 30 deletions(-) delete mode 100644 changelog.d/1068.change.md delete mode 100644 changelog.d/1079.change.md delete mode 100644 changelog.d/1081.change.md delete mode 100644 changelog.d/1084.change.md delete mode 100644 changelog.d/1085.change.md delete mode 100644 changelog.d/1090.change.md delete mode 100644 changelog.d/1092.change.md delete mode 100644 changelog.d/1099.change.md delete mode 100644 changelog.d/1105.change.md delete mode 100644 changelog.d/1107.change.md delete mode 100644 changelog.d/1117.change.md delete mode 100644 changelog.d/1120.deprecation.md delete mode 100644 changelog.d/1122.change.md delete mode 100644 changelog.d/993.breaking.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 58cfe562..fecbf56e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,16 +18,58 @@ Whenever there is a need to break compatibility, it is announced here in the cha 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. - - +## [23.1.0](https://github.com/python-attrs/attrs/tree/23.1.0) - 2023-04-16 + +### Backwards-incompatible Changes + +- Python 3.6 has been dropped and packaging switched to static package data using [Hatch](https://hatch.pypa.io/latest/). + [#993](https://github.com/python-attrs/attrs/issues/993) + + +### Deprecations + +- The support for *zope-interface* via the `attrs.validators.provides` validator is now deprecated and will be removed in, or after, April 2024. + + The presence of a C-based package in our developement dependencies has caused headaches and we're not under the impression it's used a lot. + + Let us know if you're using it and we might publish it as a separate package. + [#1120](https://github.com/python-attrs/attrs/issues/1120) + + +### Changes + +- `attrs.filters.exclude()` and `attrs.filters.include()` now support the passing of attribute names as strings. + [#1068](https://github.com/python-attrs/attrs/issues/1068) +- `attrs.has()` and `attrs.fields()` now handle generic classes correctly. + [#1079](https://github.com/python-attrs/attrs/issues/1079) +- Fix frozen exception classes when raised within e.g. `contextlib.contextmanager`, which mutates their `__traceback__` attributes. + [#1081](https://github.com/python-attrs/attrs/issues/1081) +- `@frozen` now works with type checkers that implement [PEP-681](https://peps.python.org/pep-0681/) (ex. [pyright](https://github.com/microsoft/pyright/)). + [#1084](https://github.com/python-attrs/attrs/issues/1084) +- Restored ability to unpickle instances pickled before 22.2.0. + [#1085](https://github.com/python-attrs/attrs/issues/1085) +- `attrs.asdict()`'s and `attrs.astuple()`'s type stubs now accept the `attrs.AttrsInstance` protocol. + [#1090](https://github.com/python-attrs/attrs/issues/1090) +- Fix slots class cellvar updating closure in CPython 3.8+ even when `__code__` introspection is unavailable. + [#1092](https://github.com/python-attrs/attrs/issues/1092) +- `attrs.resolve_types()` can now pass `include_extras` to `typing.get_type_hints()` on Python 3.9+, and does so by default. + [#1099](https://github.com/python-attrs/attrs/issues/1099) +- Added instructions for pull request workflow to `CONTRIBUTING.md`. + [#1105](https://github.com/python-attrs/attrs/issues/1105) +- Added *type* parameter to `attrs.field()` function for use with `attrs.make_class()`. + + Please note that type checkers ignore type metadata passed into `make_class()`, but it can be useful if you're wrapping _attrs_. + [#1107](https://github.com/python-attrs/attrs/issues/1107) +- It is now possible for `attrs.evolve()` (and `attr.evolve()`) to change fields named `inst` if the instance is passed as a positional argument. + + Passing the instance using the `inst` keyword argument is now deprecated and will be removed in, or after, April 2024. + [#1117](https://github.com/python-attrs/attrs/issues/1117) +- `attrs.validators.optional()` now also accepts a tuple of validators (in addition to lists of validators). + [#1122](https://github.com/python-attrs/attrs/issues/1122) + + ## [22.2.0](https://github.com/python-attrs/attrs/tree/22.2.0) - 2022-12-21 ### Backwards-incompatible Changes diff --git a/changelog.d/1068.change.md b/changelog.d/1068.change.md deleted file mode 100644 index eb2be1e6..00000000 --- a/changelog.d/1068.change.md +++ /dev/null @@ -1 +0,0 @@ -`attrs.filters.exclude()` and `attrs.filters.include()` now support the passing of attribute names as strings. diff --git a/changelog.d/1079.change.md b/changelog.d/1079.change.md deleted file mode 100644 index a50fc4a8..00000000 --- a/changelog.d/1079.change.md +++ /dev/null @@ -1 +0,0 @@ -`attrs.has()` and `attrs.fields()` now handle generic classes correctly. diff --git a/changelog.d/1081.change.md b/changelog.d/1081.change.md deleted file mode 100644 index c271d652..00000000 --- a/changelog.d/1081.change.md +++ /dev/null @@ -1 +0,0 @@ -Fix frozen exception classes when raised within e.g. `contextlib.contextmanager`, which mutates their `__traceback__` attributes. diff --git a/changelog.d/1084.change.md b/changelog.d/1084.change.md deleted file mode 100644 index aa4e7caf..00000000 --- a/changelog.d/1084.change.md +++ /dev/null @@ -1 +0,0 @@ -`@frozen` now works with type checkers that implement [PEP-681](https://peps.python.org/pep-0681/) (ex. [pyright](https://github.com/microsoft/pyright/)). diff --git a/changelog.d/1085.change.md b/changelog.d/1085.change.md deleted file mode 100644 index 483fc87d..00000000 --- a/changelog.d/1085.change.md +++ /dev/null @@ -1 +0,0 @@ -Restored ability to unpickle instances pickled before 22.2.0. diff --git a/changelog.d/1090.change.md b/changelog.d/1090.change.md deleted file mode 100644 index 5452d16a..00000000 --- a/changelog.d/1090.change.md +++ /dev/null @@ -1 +0,0 @@ -`attrs.asdict()`'s and `attrs.astuple()`'s type stubs now accept the `attrs.AttrsInstance` protocol. diff --git a/changelog.d/1092.change.md b/changelog.d/1092.change.md deleted file mode 100644 index edef253d..00000000 --- a/changelog.d/1092.change.md +++ /dev/null @@ -1 +0,0 @@ -Fix slots class cellvar updating closure in CPython 3.8+ even when `__code__` introspection is unavailable. diff --git a/changelog.d/1099.change.md b/changelog.d/1099.change.md deleted file mode 100644 index a2114ae8..00000000 --- a/changelog.d/1099.change.md +++ /dev/null @@ -1 +0,0 @@ -`attrs.resolve_types()` can now pass `include_extras` to `typing.get_type_hints()` on Python 3.9+, and does so by default. diff --git a/changelog.d/1105.change.md b/changelog.d/1105.change.md deleted file mode 100644 index ac0b460c..00000000 --- a/changelog.d/1105.change.md +++ /dev/null @@ -1 +0,0 @@ -Added instructions for pull request workflow to `CONTRIBUTING.md`. diff --git a/changelog.d/1107.change.md b/changelog.d/1107.change.md deleted file mode 100644 index 07954686..00000000 --- a/changelog.d/1107.change.md +++ /dev/null @@ -1,3 +0,0 @@ -Added *type* parameter to `attrs.field()` function for use with `attrs.make_class()`. - -Please note that type checkers ignore type metadata passed into `make_class()`, but it can be useful if you're wrapping _attrs_. diff --git a/changelog.d/1117.change.md b/changelog.d/1117.change.md deleted file mode 100644 index 8e9f5d53..00000000 --- a/changelog.d/1117.change.md +++ /dev/null @@ -1,3 +0,0 @@ -It is now possible for `attrs.evolve()` (and `attr.evolve()`) to change fields named `inst` if the instance is passed as a positional argument. - -Passing the instance using the `inst` keyword argument is now deprecated and will be removed in, or after, April 2024. diff --git a/changelog.d/1120.deprecation.md b/changelog.d/1120.deprecation.md deleted file mode 100644 index e39584b6..00000000 --- a/changelog.d/1120.deprecation.md +++ /dev/null @@ -1,5 +0,0 @@ -The support for *zope-interface* via the `attrs.validators.provides` validator is now deprecated and will be removed in, or after, April 2024. - -The presence of a C-based package in our developement dependencies has caused headaches and we're not under the impression it's used a lot. - -Let us know if you're using it and we might publish it as a separate package. diff --git a/changelog.d/1122.change.md b/changelog.d/1122.change.md deleted file mode 100644 index 6f366b91..00000000 --- a/changelog.d/1122.change.md +++ /dev/null @@ -1 +0,0 @@ -`attrs.validators.optional()` now also accepts a tuple of validators (in addition to lists of validators). diff --git a/changelog.d/993.breaking.md b/changelog.d/993.breaking.md deleted file mode 100644 index 3a689a28..00000000 --- a/changelog.d/993.breaking.md +++ /dev/null @@ -1 +0,0 @@ -Python 3.6 has been dropped and packaging switched to static package data using [Hatch](https://hatch.pypa.io/latest/).