Releases: reagento/adaptix
v3.0.0b9 — Python 3.13 support
- Add support for all Python 3.13 new features.
- Add Why not Pydantic? article.
- All iterables now are dumped to tuple (or list for list children).
See the full list of changes at changelog.
v3.0.0b8 — Generation optimization
- New providers for working with time:
datetime_by_timestamp
,date_by_timestamp
anddatetime_by_format
. - Add
exec_type_checking
function to deal with cyclic references by executingif TYPE_CHECKING:
constructs. - Add support for bytes inside literal, for example
Literal[b"abc"]
. - The library shows a hint if one class is a model and the other is not.
- Traceback of CannotProvide is hidden (it is raised when loader, dumper, or converter can not be created). It simplifies error messages to users. You can show traceback by disabling hide_traceback parameter of Retort.
- Drop support of Python 3.8.
- Refactor internal provider routing system. It becomes more simple and readable. Also, internal caching is added. This led to a 40% speedup in loader generation for medium models and up to 4x speedup for large models with many recursive types.
See the full list of changes at changelog.
v3.0.0b7 — Important fixes
- Allow redefining coercer inside
Optional
using an inner type if source and destination types are same. - Fix ForwardRef evaluation inside
__bound__
ofTypeVar
forPython 3.12.4
. NoSuitableProvider
exception was renamed toProviderNotFoundError
(old name is available as alias).
See the full list of changes at changelog.
v3.0.0b6 — Linking several fields
-
Now, you can merge several fields or access the model directly via conversion.link_function.
See Link function for details. -
Add a special column type for serializing and deserializing JSON inside SQLAlchemy.
See SQLAlchemy JSON for details. -
Add
Extended Usage
article for model conversion and other documentation updates.
See the full list of changes at changelog.
v3.0.0b5 — Pydantic support
-
Add support for Pydantic models!
Now you can work with pydantic models like any other: construct from dict, serialize to dict, convert to any other model, and convert it to any other model.
Also, you can use integrations.pydantic.native_pydantic to delegate loading and dumping to pydantic itself.
-
Add support for dumping
Literal
insideUnion
. #237 -
Add support for
BytesIO
andIO[bytes]
. #270
See the full list of changes at changelog.
v3.0.0b4 — model conversion inside compound types
- Models can be automatically converted inside compound types like Optional, list, dict etc.
- An error of loader, dumper, and converter generation contains a much more readable location
- Add coercer for builtin iterables and dict.
See the full list of changes at changelog.
v3.0.0b3 — enhancing model conversion
- Coercer can be added directly inside the link.
- Added ability to link constant values and factories.
- Better errors that the coercer was not found.
- More automatic do-nothing coercion detection
See the full list of changes at changelog.
v3.0.0b2 — model conversion and sqlalchemy support
- New major feature is out!
Added support for model conversion! Now, you can generate boilerplate converter function by adaptix.
See conversion tutorial for details. - Basic support for sqlalchemy models are added!
- Added enum support inside Literal.
- Added flags support.
- Added defaultdict support.
See full list of changes at changelog.