Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jun 14, 2025

This PR contains the following updates:

Package Change Age Confidence
cattrs (changelog) ==24.1.3==25.3.0 age confidence

Release Notes

python-attrs/cattrs (cattrs)

v25.3.0

Compare Source

  • Potentially breaking: Abstract sets are now structured into frozensets.
    This allows hashability, better immutability and is more consistent with the collections.abc.Set type.
    See Migrations for steps to restore legacy behavior.
    (#​686)
  • Python 3.14 is now supported and part of the test matrix.
    (#​653)
  • Fix unstructuring NewTypes with the {class}BaseConverter.
    (#​684)
  • Make some Hypothesis tests more robust.
    (#​684)
  • {func}cattrs.strategies.include_subclasses now works with generic parent classes and the tagged union strategy.
    (#​683)

v25.2.0

Compare Source

  • Potentially breaking: Sequences are now structured into tuples.
    This allows hashability, better immutability and is more consistent with the collections.abc.Sequence type.
    See Migrations for steps to restore legacy behavior.
    (#​663)
  • Add a use_alias parameter to {class}cattrs.Converter.
    {func}cattrs.gen.make_dict_unstructure_fn_from_attrs, {func}cattrs.gen.make_dict_unstructure_fn,
    {func}cattrs.gen.make_dict_structure_fn_from_attrs, {func}cattrs.gen.make_dict_structure_fn
    and {func}cattrs.gen.typeddicts.make_dict_structure_fn will use the value for the use_alias parameter from the given converter by default now.
    If you're using these functions directly, the old behavior can be restored by passing in the desired value directly.
    (#​596 #​660)
  • The union passthrough strategy now by default accepts ints for unions that contain floats but not ints,
    when configured to be able to handle both ints and floats.
    This more closely matches the current typing behavior.
    (#​656 #​668)
  • Fix unstructuring of generic classes with stringified annotations.
    (#​661 #​662
  • For {class}cattrs.errors.StructureHandlerNotFoundError and {class}cattrs.errors.ForbiddenExtraKeysError
    correctly set {attr}BaseException.args in super() and hence make them pickable.
    (#​666)
  • The default disambiguation hook factory is now only enabled for converters with unstructure_strat=AS_DICT (the default).
    Since the strategy doesn't support tuples, it is skipped for unstructure_strat=AS_TUPLE converters.
    (#​673)
  • Switch to uv and just in lieu of PDM, tox and Make.
    See the Contributing section for new workflow instructions.
    (#​671)

v25.1.1

Compare Source

  • Fixed AttributeError: no attribute '__parameters__' while structuring attrs classes that inherit from parametrized generic aliases from collections.abc.
    (#​654 #​655)

v25.1.0

Compare Source

  • Potentially breaking: The converters raise {class}StructureHandlerNotFoundError more eagerly (on hook creation, instead of on hook use).
    This helps surfacing problems with missing hooks sooner.
    See Migrations for steps to restore legacy behavior.
    (#​577)
  • Add a Migrations page, with instructions on migrating changed behavior for each version.
    (#​577)
  • typing.Self is now supported in attrs classes, dataclasses, TypedDicts and the dict NamedTuple factories.
    See typing.Self for details.
    (#​299 #​627)
  • PEP 695 type aliases can now be used with {meth}BaseConverter.register_structure_hook and {meth}BaseConverter.register_unstructure_hook.
    Previously, they required the use of {meth}BaseConverter.register_structure_hook_func (which is still supported).
    (#​647)
  • Expose {func}cattrs.cols.mapping_unstructure_factory through {mod}cattrs.cols.
  • Some defaultdicts are now supported by default, and
    {func}cattrs.cols.is_defaultdict and {func}cattrs.cols.defaultdict_structure_factory are exposed through {mod}cattrs.cols.
    (#​519 #​588)
  • Generic PEP 695 type aliases are now supported.
    (#​611 #​618)
  • The tagged union strategy now also supports type aliases of unions.
    (#​649)
  • {meth}Converter.copy and {meth}BaseConverter.copy are correctly annotated as returning Self.
    (#​644)
  • Many preconf converters (bson, stdlib JSON, cbor2, msgpack, msgspec, orjson, ujson) skip unstructuring int and str enums,
    leaving them to the underlying libraries to handle with greater efficiency.
    (#​598)
  • The {class}msgspec JSON preconf converter <cattrs.preconf.msgspec.MsgspecJsonConverter> now handles dataclasses with private attributes more efficiently.
    (#​624)
  • Literals containing enums are now unstructured properly, and their unstructuring is greatly optimized in the bson, stdlib JSON, cbor2, msgpack, msgspec, orjson and ujson preconf converters.
    (#​598)
  • Preconf converters now handle dictionaries with literal keys properly.
    (#​599)
  • Structuring TypedDicts from invalid inputs now properly raises a {class}ClassValidationError.
    (#​615 #​616)
  • {func}cattrs.strategies.include_subclasses now properly works with generic parent classes.
    (#​649)
  • Replace cattrs.gen.MappingStructureFn with {class}cattrs.SimpleStructureHook.
  • Python 3.13 is now supported.
    (#​543 #​547)
  • Python 3.8 is no longer supported, as it is end-of-life. Use previous versions on this Python version.
    (#​591)
  • Change type of Converter.__init__.unstruct_collection_overrides from Callable to Mapping[type, UnstructureHook]
    (#​594).
  • Adopt the Contributor Covenant Code of Conduct (just like attrs).

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 6 times, most recently from b89f7dc to eaff474 Compare June 21, 2025 22:42
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 3 times, most recently from 2893760 to 0b5dafa Compare July 5, 2025 18:04
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 3 times, most recently from dcf708f to 9a6180b Compare July 23, 2025 10:52
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch from 9a6180b to a8113a9 Compare July 28, 2025 10:29
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 2 times, most recently from 90e43b3 to a76d8a2 Compare August 7, 2025 21:14
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 2 times, most recently from 016fb02 to 33a1e71 Compare August 17, 2025 08:48
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch from 33a1e71 to e3a8714 Compare August 23, 2025 13:27
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 3 times, most recently from 61d7459 to d55dc51 Compare September 8, 2025 21:06
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 2 times, most recently from d7e9580 to 59d3948 Compare September 14, 2025 21:37
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 4 times, most recently from 14133a4 to e4164fb Compare September 23, 2025 01:49
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 3 times, most recently from ba6e5ad to beb9c0c Compare September 24, 2025 04:49
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 2 times, most recently from b9907c1 to 1c9961d Compare September 24, 2025 08:51
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 2 times, most recently from 26d671f to d57f06c Compare October 14, 2025 01:42
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 4 times, most recently from c17f986 to 7f19f70 Compare October 23, 2025 02:02
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 3 times, most recently from 94190cf to 4212f86 Compare October 30, 2025 04:30
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 2 times, most recently from 2a11eb2 to fdcfdeb Compare December 1, 2025 09:28
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 2 times, most recently from afebb74 to 7ed0ae1 Compare December 6, 2025 09:03
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch 3 times, most recently from 418ef1e to bf25f44 Compare December 25, 2025 21:47
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch from bf25f44 to d066189 Compare December 27, 2025 20:53
@renovate renovate bot force-pushed the renovate/cattrs-25.x branch from d066189 to ea43377 Compare January 3, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant