All Versions
26
Latest Version
Avg Release Cycle
80 days
Latest Release
87 days ago
Changelog History
Page 2
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 ofattrs
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
intoGenConverter.gen_un/structure_attrs_fromdict
to allow calling back toConverter.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.
- 0๏ธโฃ The default disambiguator will not consider non-required fields any more.
(
-
v1.1.1 Changes
October 30, 2020- โ Add metadata for supported Python versions.
(
#103 <https://github.com/python-attrs/cattrs/pull/103>
_)
- โ Add metadata for supported Python versions.
(
-
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]
vstyping.List[int]
). cattrs
now includes functions to generate specialized structuring and unstructuring hooks. Specialized hooks are faster and support overrides (omit_if_default
andrename
). See thecattr.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 onattrs
>= 20.1.0, because ofattr.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.
- 0๏ธโฃ
-
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.
- ๐ The disambiguation function generator now supports unions of
-
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 newConverter
:: | | .. 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.
- โ Removed the undocumented