Skip to content

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 1, 2025

Updates the requirements on cattrs to permit the latest version.

Release notes

Sourced from cattrs's releases.

v25.2.0

  • 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 cattrs.Converter. cattrs.gen.make_dict_unstructure_fn_from_attrs, cattrs.gen.make_dict_unstructure_fn, cattrs.gen.make_dict_structure_fn_from_attrs, cattrs.gen.make_dict_structure_fn and 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 cattrs.errors.StructureHandlerNotFoundError and cattrs.errors.ForbiddenExtraKeysError correctly set 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)

New Contributors

Full Changelog: python-attrs/cattrs@v25.1.1...v25.2.0

Changelog

Sourced from cattrs's changelog.

25.2.0 (2025-08-31)

  • 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)

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.

... (truncated)

Commits
  • 727aa89 v25.2.0
  • 7943a6a Added missing imports to hook factory decorator example. (#677)
  • 3e242bf Update coverage, use the new run.patch setting (#676)
  • 53fb451 Introduce Justfile, use uv (#671)
  • 5d23a08 Bump test dependencies (#673)
  • 5b18ffd Update dev dependencies (#672)
  • 025f521 union passthrough: add accept_ints_as_floats (#668)
  • 591b4f7 Make ForbiddenExtraKeysError.__str__ deterministic (#670)
  • f5d0594 (errors) Correctly set BaseException.args and make them pickable (#666)
  • bc325a8 DOCS: Fix version for "default structure hook fallback factory" migration (#665)
  • Additional commits viewable in compare view

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)

Updates the requirements on [cattrs](https://github.com/python-attrs/cattrs) to permit the latest version.
- [Release notes](https://github.com/python-attrs/cattrs/releases)
- [Changelog](https://github.com/python-attrs/cattrs/blob/main/HISTORY.md)
- [Commits](python-attrs/cattrs@v1.8.0...v25.2.0)

---
updated-dependencies:
- dependency-name: cattrs
  dependency-version: 25.2.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added auto-approve dependencies This issue is a problem in a dependency or a pull request that updates a dependency file. language/python Related to Python bindings labels Sep 1, 2025
Copy link
Contributor

mergify bot commented Sep 1, 2025

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Sep 1, 2025
Copy link
Contributor

mergify bot commented Sep 1, 2025

Merging (with squash)...

@mergify mergify bot merged commit e92b9eb into main Sep 1, 2025
41 checks passed
@mergify mergify bot deleted the dependabot/pip/packages/jsii/python-runtime/cattrs-gte-1.8-and-lt-25.3 branch September 1, 2025 19:43
@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-approve dependencies This issue is a problem in a dependency or a pull request that updates a dependency file. language/python Related to Python bindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants