scdlbot icon indicating copy to clipboard operation
scdlbot copied to clipboard

Bump cattrs from 24.1.3 to 25.1.1

Open dependabot[bot] opened this issue 10 months ago • 0 comments

Bumps cattrs from 24.1.3 to 25.1.1.

Release notes

Sourced from cattrs's releases.

v25.1.1

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

v25.1.0

  • Potentially breaking: The converters raise 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 BaseConverter.register_structure_hook and BaseConverter.register_unstructure_hook. Previously, they required the use of BaseConverter.register_structure_hook_func (which is still supported). (#647)
  • Expose cattrs.cols.mapping_unstructure_factory through cattrs.cols.
  • Some defaultdicts are now supported by default, and cattrs.cols.is_defaultdict and cattrs.cols.defaultdict_structure_factory are exposed through 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)
  • Converter.copy and 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 msgspec JSON preconf converter 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 ClassValidationError. (#615 #616)
  • cattrs.strategies.include_subclasses now properly works with generic parent classes. (#649)
  • Replace cattrs.gen.MappingStructureFn with 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).
Changelog

Sourced from cattrs's changelog.

25.1.1 (2025-06-04)

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

25.1.0 (2025-05-31)

  • 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).
Commits
  • 9894095 v25.1.1
  • 7c67730 Fix structuring of attrs class that inherit from typing/collections.abc gener...
  • 0bb472a Small changelog tweak
  • 9122f10 v25.1.0
  • ea4c311 Support generic parents in include_subclasses strategy (#650)
  • c95a0a5 configure_tagged_union: support type aliases (#649)
  • 58c7ba6 register_un/structure_hook: support type aliases (#647)
  • 0b6586a Converters: copy() returns Self (#644)
  • 0c36adc Fix reliance on unspecified behavior in test_disambiguators.py (#642)
  • d8f17b7 Merge branch '24.1'
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

dependabot[bot] avatar Jun 05 '25 09:06 dependabot[bot]