chore(deps): update dependency cattrs to v25 #184
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.
This PR contains the following updates:
==24.1.3→==25.3.0Release Notes
python-attrs/cattrs (cattrs)
v25.3.0Compare Source
This allows hashability, better immutability and is more consistent with the
collections.abc.Settype.See Migrations for steps to restore legacy behavior.
(#686)
(#653)
BaseConverter.(#684)
(#684)
cattrs.strategies.include_subclassesnow works with generic parent classes and the tagged union strategy.(#683)
v25.2.0Compare Source
This allows hashability, better immutability and is more consistent with the
collections.abc.Sequencetype.See Migrations for steps to restore legacy behavior.
(#663)
use_aliasparameter 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_fnand {func}
cattrs.gen.typeddicts.make_dict_structure_fnwill use the value for theuse_aliasparameter 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)
when configured to be able to handle both ints and floats.
This more closely matches the current typing behavior.
(#656 #668)
(#661 #662
cattrs.errors.StructureHandlerNotFoundErrorand {class}cattrs.errors.ForbiddenExtraKeysErrorcorrectly set {attr}
BaseException.argsinsuper()and hence make them pickable.(#666)
unstructure_strat=AS_DICT(the default).Since the strategy doesn't support tuples, it is skipped for
unstructure_strat=AS_TUPLEconverters.(#673)
uvandjustin lieu of PDM, tox and Make.See the Contributing section for new workflow instructions.
(#671)
v25.1.1Compare Source
AttributeError: no attribute '__parameters__'while structuring attrs classes that inherit from parametrized generic aliases fromcollections.abc.(#654 #655)
v25.1.0Compare Source
StructureHandlerNotFoundErrormore 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)
(#577)
typing.Selfis now supported in attrs classes, dataclasses, TypedDicts and the dict NamedTuple factories.See
typing.Selffor details.(#299 #627)
BaseConverter.register_structure_hookand {meth}BaseConverter.register_unstructure_hook.Previously, they required the use of {meth}
BaseConverter.register_structure_hook_func(which is still supported).(#647)
cattrs.cols.mapping_unstructure_factorythrough {mod}cattrs.cols.defaultdictsare now supported by default, and{func}
cattrs.cols.is_defaultdictand {func}cattrs.cols.defaultdict_structure_factoryare exposed through {mod}cattrs.cols.(#519 #588)
(#611 #618)
(#649)
Converter.copyand {meth}BaseConverter.copyare correctly annotated as returningSelf.(#644)
intandstrenums,leaving them to the underlying libraries to handle with greater efficiency.
(#598)
msgspec JSON preconf converter <cattrs.preconf.msgspec.MsgspecJsonConverter>now handles dataclasses with private attributes more efficiently.(#624)
(#598)
(#599)
ClassValidationError.(#615 #616)
cattrs.strategies.include_subclassesnow properly works with generic parent classes.(#649)
cattrs.gen.MappingStructureFnwith {class}cattrs.SimpleStructureHook.(#543 #547)
(#591)
Converter.__init__.unstruct_collection_overridesfromCallabletoMapping[type, UnstructureHook](#594).
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.
This PR was generated by Mend Renovate. View the repository job log.