fix(deps): update dependency cattrs to v25 #243
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.
Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs from Renovate will soon appear from 'Mend'. Learn more here.
This PR contains the following updates:
==24.1.3
->==25.2.0
Release Notes
python-attrs/cattrs (cattrs)
v25.2.0
Compare Source
This allows hashability, better immutability and is more consistent with the
collections.abc.Sequence
type.See Migrations for steps to restore legacy behavior.
(#663)
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 theuse_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)
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.StructureHandlerNotFoundError
and {class}cattrs.errors.ForbiddenExtraKeysError
correctly set {attr}
BaseException.args
insuper()
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_TUPLE
converters.(#673)
uv
andjust
in lieu of PDM, tox and Make.See the Contributing section for new workflow instructions.
(#671)
v25.1.1
Compare Source
AttributeError: no attribute '__parameters__'
while structuring attrs classes that inherit from parametrized generic aliases fromcollections.abc
.(#654 #655)
v25.1.0
Compare Source
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)
(#577)
typing.Self
is now supported in attrs classes, dataclasses, TypedDicts and the dict NamedTuple factories.See
typing.Self
for details.(#299 #627)
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)
cattrs.cols.mapping_unstructure_factory
through {mod}cattrs.cols
.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)
(#611 #618)
(#649)
Converter.copy
and {meth}BaseConverter.copy
are correctly annotated as returningSelf
.(#644)
int
andstr
enums,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_subclasses
now properly works with generic parent classes.(#649)
cattrs.gen.MappingStructureFn
with {class}cattrs.SimpleStructureHook
.(#543 #547)
(#591)
Converter.__init__.unstruct_collection_overrides
fromCallable
toMapping[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.