=======
Features
--------
- Support for building result with setattr
So far, the converter would always generate a list of values and then pass
them to the constructor of the target type. From now on, there’s an
additional `strategy` argument in `mappr.convert`. It defaults to
`mappr.Strategy.CONSTRUCTOR` which is the same as it’s been so far. What’s
new is the ability to set it to `mappr.Strategy.SETATTR` which will cause the
converter to use empty constructor and then use `setattr()` to set all the
values on newly created object. Might cater to some cases.
- Use contextvars for global registers
Using pure globals is unsafe and `threading.local` doesn’t work with async
code. This unfortunately means we need to drop py3.6 support.
- Easily register simple bi-directional converters
An often case is to register converters between 2 types where the only thing
is a change of name of some of the fields. Now this can be easily implemented
via `mappr.register_iso()`. You pass in a str: str dictionary that maps attr
names from one class to another.
Dev tasks
---------
- Add more tests
Even more are comming. Need to test this library well.
- Because we’re dropping py36 support, we’re back to using dataclasses. This
also means the dataclasses integration is no longer an integration, but is
part of the core.
Refactored
----------
- Better structure the code
Move few things around so it’s clearer what is what. `mappr.registry` now
contains all converter registration code and `mappr.conversion` is only
concerned about the conversion. Move conversion code outside `TypeConverter`.
Makes things unnecesarily coupled.
- Cleaner dataclasses integration