diff --git a/HISTORY.md b/HISTORY.md index 7c7a2300..8bec3ee8 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -22,6 +22,7 @@ Our backwards-compatibility policy can be found [here](https://github.com/python - Python 3.13 is now supported. ([#543](https://github.com/python-attrs/cattrs/pull/543) [#547](https://github.com/python-attrs/cattrs/issues/547)) - Python 3.8 is no longer supported, as it is end-of-life. Use previous versions on this Python version. +- Change type of Converter.__init__.unstruct_collection_overrides from Callable to Mapping[type, UnstructureHook] ([#594](https://github.com/python-attrs/cattrs/pull/594). ## 24.1.2 (2024-09-22) diff --git a/src/cattrs/converters.py b/src/cattrs/converters.py index 1218a71d..c21f5ea7 100644 --- a/src/cattrs/converters.py +++ b/src/cattrs/converters.py @@ -1046,7 +1046,7 @@ def __init__( omit_if_default: bool = False, forbid_extra_keys: bool = False, type_overrides: Mapping[type, AttributeOverride] = {}, - unstruct_collection_overrides: Mapping[type, Callable] = {}, + unstruct_collection_overrides: Mapping[type, UnstructureHook] = {}, prefer_attrib_converters: bool = False, detailed_validation: bool = True, unstructure_fallback_factory: HookFactory[UnstructureHook] = lambda _: identity,