Support overrides in annotated attributes#717
Merged
Conversation
85bd2e8 to
ad643c7
Compare
hynek
reviewed
Jan 27, 2026
Co-authored-by: Hynek Schlawack <hs@ox.cx>
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this pull request
Feb 22, 2026
## 26.1.0 (2026-02-18)
- Add the {mod}`tomllib <cattrs.preconf.tomllib>` preconf converter.
See [here](https://catt.rs/en/latest/preconf.html#tomllib) for details.
([#716](python-attrs/cattrs#716))
- Customizing un/structuring of _attrs_ classes, dataclasses, TypedDicts and dict NamedTuples is now possible by using `Annotated[T, override()]` on fields.
See [here](https://catt.rs/en/stable/customizing.html#using-typing-annotated-t-override) for more details.
([#717](python-attrs/cattrs#717))
- Fix structuring of nested generic classes with stringified annotations.
([#688](python-attrs/cattrs#688))
- Python 3.9 is no longer supported, as it is end-of-life. Use previous versions on this Python version.
([#698](python-attrs/cattrs#698))
- Apply the attrs converter to the default value before checking if it is equal to the attribute's value, when `omit_if_default` is true and an attrs converter is specified.
([#696](python-attrs/cattrs#696))
- Use the optional `_value_` type hint to structure and unstructure enums if present.
([#699](python-attrs/cattrs#699))
- Aliases (when in use) now properly generate rename metadata in generated hooks.
([#706](python-attrs/cattrs#706) [#710](python-attrs/cattrs#710))
- _cattrs_ now tracks performance using [codspeed](https://codspeed.io/python-attrs/cattrs).
([#703](python-attrs/cattrs#703))
- The {mod}`tomlkit <cattrs.preconf.tomlkit>` preconf converter now properly handles native `date` objects when structuring.
([#707](python-attrs/cattrs#707) [#708](python-attrs/cattrs#708))
- The {mod}`tomlkit <cattrs.preconf.tomlkit>` preconf converter now passes date objects directly to _tomlkit_ for unstructuring.
([#707](python-attrs/cattrs#707) [#708](python-attrs/cattrs#708))
- Enum handling has been optimized by switching to hook factories, improving performance especially for plain enums.
([#705](python-attrs/cattrs#705))
- Fix {func}`cattrs.strategies.include_subclasses` when used with {func}`cattrs.strategies.configure_tagged_union` and classes using diamond inheritance.
([#685](python-attrs/cattrs#685) [#713](python-attrs/cattrs#713))
- Fix {func}`cattrs.strategies.configure_tagged_union` when used with recursive type aliases.
([#678](python-attrs/cattrs#678) [#714](python-attrs/cattrs#714))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.