All Versions
26
Latest Version
Avg Release Cycle
80 days
Latest Release
87 days ago

Changelog History
Page 2

  • v1.2.0 Changes

    January 31, 2021
    • ๐Ÿ‘ converter.unstructure now supports an optional parameter, unstructure_as, which can be used to unstructure something as a different type. Useful for unions.
    • ๐Ÿ‘Œ Improve support for union un/structuring hooks. Flesh out docs for advanced union handling. (#115 <https://github.com/python-attrs/cattrs/pull/115>_)
    • ๐Ÿ›  Fix GenConverter behavior with inheritance hierarchies of attrs classes. (#117 <https://github.com/python-attrs/cattrs/pull/117>) (#116 <https://github.com/python-attrs/cattrs/issues/116>)
    • Refactor GenConverter.un/structure_attrs_fromdict into GenConverter.gen_un/structure_attrs_fromdict to allow calling back to Converter.un/structure_attrs_fromdict without sideeffects. (#118 <https://github.com/python-attrs/cattrs/issues/118>_)
  • v1.1.2 Changes

    November 29, 2020
    • 0๏ธโƒฃ The default disambiguator will not consider non-required fields any more. (#108 <https://github.com/python-attrs/cattrs/pull/108>_)
    • ๐Ÿ›  Fix a couple type annotations. (#107 <https://github.com/python-attrs/cattrs/pull/107>) (#105 <https://github.com/python-attrs/cattrs/issues/105>)
    • ๐Ÿ›  Fix a GenConverter unstructuring issue and tests.
  • v1.1.1 Changes

    October 30, 2020
    • โž• Add metadata for supported Python versions. (#103 <https://github.com/python-attrs/cattrs/pull/103>_)
  • v1.1.0 Changes

    October 29, 2020
    • ๐Ÿ‘ Python 2, 3.5 and 3.6 support removal. If you need it, use a version below 1.1.0.
    • ๐Ÿ‘ Python 3.9 support, including support for built-in generic types (list[int] vs typing.List[int]).
    • cattrs now includes functions to generate specialized structuring and unstructuring hooks. Specialized hooks are faster and support overrides (omit_if_default and rename). See the cattr.gen module.
    • 0๏ธโƒฃ cattrs now includes a converter variant, cattr.GenConverter, that automatically generates specialized hooks for attrs classes. This converter will become the default in the future.
    • Generating specialized structuring hooks now invokes attr.resolve_types <https://www.attrs.org/en/stable/api.html#attr.resolve_types>_ on a class if the class makes use of the new PEP 563 annotations.
    • cattrs now depends on attrs >= 20.1.0, because of attr.resolve_types.
    • 0๏ธโƒฃ Specialized hooks now support generic classes. The default converter will generate and use a specialized hook upon encountering a generic class.
  • v1.0.0 Changes

    December 27, 2019
    • 0๏ธโƒฃ attrs classes with private attributes can now be structured by default.
    • Structuring from dictionaries is now more lenient: extra keys are ignored.
    • cattrs has improved type annotations for use with Mypy.
    • Unstructuring sets and frozensets now works properly.
  • v0.9.1 Changes

    October 26, 2019
    • ๐Ÿ‘ Python 3.8 support.
  • v0.9.0 Changes

    July 22, 2018
    • ๐Ÿ‘ Python 3.7 support.
  • v0.8.1 Changes

    June 19, 2018
    • ๐Ÿ‘ The disambiguation function generator now supports unions of attrs classes and NoneType.
  • v0.8.0 Changes

    April 14, 2018
    • Distribution fix.
  • v0.7.0 Changes

    April 12, 2018
    • โœ‚ Removed the undocumented Converter.unstruct_strat property setter.
    • ๐Ÿšš | Removed the ability to set the Converter.structure_attrs instance field. | As an alternative, create a new Converter:: | | .. code-block:: python | | >>> converter = cattr.Converter(unstruct_strat=cattr.UnstructureStrategy.AS_TUPLE)
    • Some micro-optimizations were applied; a structure(unstructure(obj)) roundtrip is now up to 2 times faster.