All Versions
27
Latest Version
Avg Release Cycle
83 days
Latest Release
869 days ago
Changelog History
Page 3
Changelog History
Page 3
-
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
-
v0.6.0 Changes
December 25, 2017- ๐ Packaging fixes.
(
#17 <https://github.com/python-attrs/cattrs/pull/17>
_)
- ๐ Packaging fixes.
(
-
v0.5.0 Changes
December 11, 2017- ๐ structure/unstructure now supports using functions as well as classes for deciding the appropriate function.
- added
Converter.register_structure_hook_func
, to register a function instead of a class for determining handler func. - added
Converter.register_unstructure_hook_func
, to register a function instead of a class for determining handler func. - vendored typing is no longer needed, nor provided.
- 0๏ธโฃ Attributes with default values can now be structured if they are missing in the input.
(
#15 <https://github.com/python-attrs/cattrs/pull/15>
_) - |
Optional
attributes can no longer be structured if they are missing in the input. | In other words, this no longer works: | | .. code-block:: python | | @attr.s | class A: | a: Optional[int] = attr.ib() | | >>> cattr.structure({}, A) | - ๐
cattr.typed
removed since the functionality is now present inattrs
itself. Replace instances ofcattr.typed(type)
withattr.ib(type=type)
.
-
v0.4.0 Changes
July 17, 2017Converter.loads
is nowConverter.structure
, andConverter.dumps
is nowConverter.unstructure
.- ๐ Python 2.7 is supported.
- ๐ Moved
cattr.typing
tocattr.vendor.typing
to support different vendored versions of typing.py for Python 2 and Python 3. - ๐ Type metadata can be added to
attrs
classes usingcattr.typed
.
-
v0.3.0 Changes
March 18, 2017- ๐ Python 3.4 is no longer supported.
- Introduced
cattr.typing
for use with Python versions 3.5.2 and 3.6.0. Minor changes to work with newer versions of
typing
.- Bare Optionals are not supported any more (use
Optional[Any]
).
- Bare Optionals are not supported any more (use
Attempting to load unrecognized classes will result in a ValueError, and a helpful message to register a loads hook.
Loading
attrs
classes is now documented.The global converter is now documented.
cattr.loads_attrs_fromtuple
andcattr.loads_attrs_fromdict
are now exposed.
-
v0.2.0 Changes
October 02, 2016- ๐ Tests and documentation.
-
v0.1.0 Changes
August 13, 2016- ๐ First release on PyPI.