Changelog¶
Versions follow Semantic Versioning (<major>.<minor>.<patch>),
but with minor syntax differences to satisfy python package
version specifiers.
Until a stable version is released (end of beta), new versions may contain backward-incompatible changes, but we will strive to deprecate features first instead of immediately removal. After that, breaking changes will only be introduced in major versions.
Non-guaranteed behavior
Some aspects of behavior are not guaranteed and could be changed at any release without any mention in the changelog (or even vary in different environments or different runs).
Such details are highlighted in the documentation via this admonition.
3.0.0b12 – 2026-04-04¶
Features¶
Improve formatting types inside generics for error messages
Old error example¶adaptix.ProviderNotFoundError: Cannot produce dumper for type <class '__main__.Foo'> × Cannot create dumper for model. Dumpers for some fields cannot be created │ Location: ‹Foo› ╰──▷ Cannot create dumper for model. Dumpers for some fields cannot be created │ Location: ‹Foo.limit: __main__.MinMax[__main__.Bar]› ├──▷ Cannot create dumper for union. Dumpers for some union cases cannot be created │ │ Location: ‹__main__.MinMax[__main__.Bar].min: Optional[__main__.Bar]› │ ╰──▷ Cannot find dumper │ Location: ‹Bar› ╰──▷ Cannot create dumper for union. Dumpers for some union cases cannot be created │ Location: ‹__main__.MinMax[__main__.Bar].max: Optional[__main__.Bar]› ╰──▷ Cannot find dumper Location: ‹Bar›New error example¶adaptix.ProviderNotFoundError: Cannot produce dumper for type <class '__main__.Foo'> × Cannot create dumper for model. Dumpers for some fields cannot be created │ Location: ‹Foo› ╰──▷ Cannot create dumper for model. Dumpers for some fields cannot be created │ Location: ‹Foo.limit: MinMax[Bar]› ├──▷ Cannot create dumper for union. Dumpers for some union cases cannot be created │ │ Location: ‹MinMax[Bar].min: Optional[Bar]› │ ╰──▷ Cannot find dumper │ Location: ‹Bar› ╰──▷ Cannot create dumper for union. Dumpers for some union cases cannot be created │ Location: ‹MinMax[Bar].max: Optional[Bar]› ╰──▷ Cannot find dumper Location: ‹Bar›Add support for CPython 3.14
Add support for PyPy 3.11
Add support for
ForwardRefinside conversionAllow to dump
UnionwithAnnotatedas one of cases
Breaking Changes¶
Drop support for Python 3.9
Bug Fixes¶
Fixed
impl_converterfailure with signatures when forward references is used (from __future__ import annotations) #393Fix introspection of SQLAlchemy models with custom column name
Predicates correctly matches
Final,Annotated,ClassVarandInitVar
Other¶
Switched package build-backend from setuptools to uv_build. #397
Add
real_world_appexample to documentationAdd
Known Issuespage to documentationImprove style of documentation
3.0.0b11 – 2025-05-09¶
Features¶
Completely redesigned error rendering system. All errors related to loader, dumper, and converter generation now utilize a new compact and intuitive display format. Error messages have also been substantially improved for clarity.
Old error example¶| adaptix.AggregateCannotProvide: Cannot create loader for model. Loaders for some fields cannot be created (1 sub-exception) | Location: `Book` +-+---------------- 1 ---------------- | adaptix.AggregateCannotProvide: Cannot create loader for model. Cannot fetch InputNameLayout (1 sub-exception) | Location: `Book.author: Person` +-+---------------- 1 ---------------- | adaptix.CannotProvide: Required fields ['last_name'] are skipped | Location: `Book.author: Person` +------------------------------------ The above exception was the direct cause of the following exception: Traceback (most recent call last): ... adaptix.ProviderNotFoundError: Cannot produce loader for type <class '__main__.Book'> Note: The attached exception above contains verbose description of the problemNew error example¶Traceback (most recent call last): ... adaptix.ProviderNotFoundError: Cannot produce loader for type <class '__main__.Book'> × Cannot create loader for model. Loaders for some fields cannot be created │ Location: ‹Book› ╰──▷ Cannot create loader for model. Cannot fetch `InputNameLayout` │ Location: ‹Book.author: Person› ╰──▷ Required fields ['last_name'] are skipped
Breaking Changes¶
Custom iterable subclasses are no longer supported. To use them, register via the internal (temporary) API with IterableProvider.
The
Retort.replacemethod now requiresOmittedinstead ofNoneto skip parameter values.Removed the
hide_tracebackparameter fromRetortandRetort.replace. Error rendering is now controlled via theerror_rendererparameter. PassNoneto display raw PythonExceptionGrouptraces.
Bug Fixes¶
Fixed incorrect classification of parametrized generic Pydantic models as iterables (due to Pydantic model instances being inherently iterable).
Corrected hint generation errors during model conversion.
Fixed handling of parametrized TypeAlias.
3.0.0b10 – 2025-04-13¶
Features¶
Add support for msgspec models!
Now you can work with msgspec models like any other: construct from a dict, serialize to a dict, and convert it into any other model.
Also, you can use
integrations.msgspec.native_msgspecto delegate loading and dumping to msgspec itself.This allows you to combine the flexibility of adaptix with the incredible speed of msgspec
A completely new algorithm for model dumper code generation has been implemented.
Dumping models with default values is now faster. For GitHub Issues models, which include only a few default fields, dump time has been reduced by 22%.
Now you can easily distinguish between a missing field and a None value. The new
as_sentinelfunction allows you to mark types as sentinels, ensuring they remain hidden from the outside world. See Detecting absence of a field for detail. #214Add support for
ZoneInfo. #375
Breaking Changes¶
Changed the signature of the
integrations.pydantic.native_pydanticfunction. Now, parameters for validator and serializer are grouped into dictionaries.
Bug Fixes¶
Fix default values loading for types inherited from builtin types. #363
Fix the error caused by using with_property when the function was used only once for a type.
Other¶
Internal benchmarking framework now can use SQLite to store result data #370
Add Gurubase AI to documentation
3.0.0b9 – 2024-12-15¶
Features¶
Add support for all Python 3.13 new features.
Breaking Changes¶
All iterables now are dumped to tuple (or list for list children). #348
Bug Fixes¶
Fix
NoRequiredFieldsLoadErrorraising for fields generated by name flattening.hide_traceback=Falseshows traceback now.
Other¶
Add “Why not Pydantic?” article.
3.0.0b8 – 2024-09-02¶
Features¶
Add new
datetime_by_timestampanddate_by_timestampprovider factories. #281Add
datetime_by_formatto public API. #286Add
type_tools.exec_type_checkingfunction to deal with cyclic references by executingif TYPE_CHECKING:constructs. #288Add support for bytes inside literal, for example
Literal[b"abc"]. #318The library shows a hint if one class is a model and the other is not.
Traceback of
CannotProvideis hidden (it is raised when loader, dumper, or converter can not be created). It simplifies error messages to users. You can show traceback by disablinghide_tracebackparameter ofRetort.
Breaking Changes¶
Drop support of Python 3.8.
TypedDictAt38Warningis removed.
Other¶
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.
3.0.0b7 – 2024-06-10¶
Deprecations¶
NoSuitableProviderexception was renamed toProviderNotFoundError. #245
Bug Fixes¶
Allow redefining coercer inside
Optionalusing an inner type if source and destination types are same. #279Fix
ForwardRefevaluation inside bound ofTypeVarforPython 3.12.4. #312
3.0.0b6 – 2024-05-23¶
Features¶
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 Usagearticle for model conversion and other documentation updates.
Bug Fixes¶
Fix processing of list relationships in SQLAlchemy.
Fix model loader generation with non-required field and
DebugTrail.DISABLE.
3.0.0b5 – 2024-04-20¶
Features¶
Add support for Pydantic models!
Now you can work with pydantic models like any other: construct from dict, serialize to dict, and convert it to any other model.
Also, you can use
integrations.pydantic.native_pydanticto delegate loading and dumping to pydantic itself.Add support for dumping
LiteralinsideUnion. #237Add support for
BytesIOandIO[bytes]. #270Error messages are more obvious.
Breaking Changes¶
Forbid use of constructs like
P[SomeClass].ANYbecause it is misleading (you have to useP.ANYdirectly).Private fields (any field starting with underscore) are skipped at dumping. See Private fields dumping for details.
3.0.0b4 – 2024-03-30¶
Features¶
Add coercer for builtin iterables and dict.
Models can be automatically converted inside compound types like
Optional,list,dictetc.Add
conversion.from_parampredicate factory to match only parametersAn error of loader, dumper, and converter generation contains a much more readable location.
For example:
Linking: `Book.author_ids: list[int] -> BookDTO.author_ids: list[str]`Location: `Stub.f3: memoryview`
Breaking Changes¶
Now, parameters are automatically linked only to top-level model fields. For manual linking, you can use the new
adaptix.conversion.from_parampredicate factory.
Bug Fixes¶
Fix fail to import adaptix package on python 3.8-3.10 when
-OOis used.Fix unexpected error on creating coercer between fields with
Optionaltype.Fix unexpected error with type vars getting from
UnionType.
3.0.0b3 – 2024-03-08¶
Features¶
conversion.linkacceptscoercerparameter. #256Add
conversion.link_constantto link constant values and constant factories. #258Add coercer for case when source union is subset of destination union (simple
==check is using). #242No coercer error now contains type information. #252
Add coercer for
Optional[S] -> Optional[D]ifSis coercible toD. #254
Bug Fixes¶
Model dumping now trying to save the original order of fields inside the dict. #247
Fix introspection of sqlalchemy models with
column_property(all ColumnElement is ignored excepting Column itself). #250
3.0.0b2 – 2024-02-16¶
Features¶
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. #178
Added flags support.
Now adaptix has two different ways to process flags:
flag_by_exact_value(by default) andflag_by_member_names. #197Added defaultdict support. #216
Added support of mapping for
enum_by_nameprovider. #223Created the correct path (fixing python bug) for processing
RequiredandNotRequiredwith stringified annotations orfrom __future__ import annotations. #227
Breaking Changes¶
Due to refactoring of predicate system required for new features:
create_request_checkerwas renamed tocreate_loc_stack_checkerRequestPattern(class ofP) was renamed toLocStackPatternmethod
RequestPattern.build_request_checker()was renamed toLocStackPattern.build_loc_stack_checker()
Deprecations¶
Standardize names inside
adaptix.load_error. Import of old names will emitDeprecationWarning.Old name
New name
MsgErrorMsgLoadErrorExtraFieldsErrorExtraFieldsLoadErrorExtraItemsErrorExtraItemsLoadErrorNoRequiredFieldsErrorNoRequiredFieldsLoadErrorNoRequiredItemsErrorNoRequiredItemsLoadErrorValidationErrorValidationLoadErrorBadVariantErrorBadVariantLoadErrorDatetimeFormatMismatchFormatMismatchLoadError
Bug Fixes¶
Fixed parameter shuffling on skipping optional field. #229
3.0.0b1 – 2023-12-16¶
Start of changelog.