Skip to content

v0.6.2

Choose a tag to compare

@aaronstevenwhite aaronstevenwhite released this 06 May 20:02
· 8 commits to main since this release
9792062

Fixed

  • FieldValue's recursive mapping arm uses Mapping[str, FieldValue] (covariant in its value type) instead of the invariant dict[str, FieldValue]. dict is invariant in V, so any concrete dict[str, X] (where X is a structural subset of FieldValue) was rejected by type checkers at every Model.with_(field=value) call site, forcing callers to insert cast("dict[str, FieldValue]", ...) boilerplate. The runtime contract is unchanged: every dict is also a Mapping, and the encoder pipeline's isinstance(v, dict) checks keep matching real dict payloads. (#36)

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