Skip to content

v0.4.1

Choose a tag to compare

@aaronstevenwhite aaronstevenwhite released this 05 May 18:31
· 16 commits to main since this release
ac37e50

Fixed

  • tuple[T, ...]-typed fields now coerce list input to tuple at the encoder boundary instead of raising a bare AssertionError. Mirrors Pydantic's affordance so call sites migrating across don't have to rewrite every indices=[0, 1, 2] literal. Non-iterable input still fails, but as a dx.ValidationError carrying the field name and a type_error entry, not as an AssertionError from inside the encoder. (#15)
  • frozenset[T]-typed fields coerce list, set, and tuple input the same way. Bare strings are still rejected (they would otherwise silently explode into frozenset({"a", "b", "c"})).

Full changelog: https://github.com/panproto/didactic/blob/main/CHANGELOG.md