This repository was archived by the owner on Nov 15, 2026. It is now read-only.
Repository navigation
django-ty 0.5.0
Immutable
release. Only release title and notes can be modified.
Track Django model auto-primary-key state through construction, loading, saving, deletion, aliases, and branches. Requires ty-extended 0.84.4 or later in the 0.84 series.
- Unsaved auto IDs are now nullable or unset;
Book(id=123)establishes an ID before saving. Successful saves establish IDs and deletion clears them. This changes the inferred types from 0.4.0. - Validate callable defaults by their return values and reject invalid intermediate lookup paths and known invalid
__invalues. - Preserve custom request subclass types and follow Django's QueryDict mutability rules.
- Retain conservative types for overrides, uncertain saves, and project signal handlers. Dynamic or external handlers that change IDs require
model-state = false; see the documented limits.
Verified 166 contract assertions and 83 runtime proofs across all 18 supported Django/Python pairs, nine QueryDict runtime cases, 50 Rust tests, 26 Python tooling tests, Clippy, formatting, wheel installation, and 98.23% Rust line coverage.
Install with uv add django-ty==0.5.0. Enable installed plugin discovery with auto-discover = true under [tool.ty.plugins].
Compatibility results cover the documented corpus.