v0.7.0
Added
tuple[Model, ...](anddict[str, Model], plaininner: Model) now classifies anydx.Modelsubclass used directly as a field type. The classification routes through the same Embed-shaped translation thatEmbed[T]would have built, so the wire format and runtime semantics are identical and callers no longer need a single-variantTaggedUnionwrapper to collect heterogeneous record tuples. Models that areTaggedUnionroots or variants stay on the discriminated path. (#38)dx.field(opaque=True)declares a field that holds any Python value by reference and skips the type-classification pipeline entirely. The runtime stores the value on a per-instance_opaque_storageside table; attribute access returns it identity-equal;with_(...)updates it without re-classification. JSON output writesnullfor opaque fields, andmodel_validate_jsondoes not reconstruct the value: opaque fields explicitly do not round-trip through serialisation. Useful for fields that carry a runtime-only handle (a typeclass instance, a callback, a foreign object) where panproto schema integration is not the goal. (#39)
Changed
- The documentation site uses the cinder theme. The previous Material configuration is replaced by
theme: name: cinderplus a smalldocs/css/palette covering pygments token colours and mkdocstrings layout. CI no longer needs theNO_MKDOCS_2_WARNINGworkaround; the same env var has been removed fromci.yml/docs.yml/release.ymland from the README's local-build snippet.
Full changelog: https://github.com/panproto/didactic/blob/main/CHANGELOG.md