Skip to content

v3.0.0b8 — Generation optimization

Latest
Compare
Choose a tag to compare
@zhPavel zhPavel released this 02 Sep 20:40
· 3 commits to main since this release
c014783
  • New providers for working with time: datetime_by_timestamp, date_by_timestamp and datetime_by_format.
  • Add exec_type_checking function to deal with cyclic references by executing if 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.