Skip to content

natural-keys 2.1.0

Compare
Choose a tag to compare
@sheppard sheppard released this 16 Jun 14:20
· 3 commits to main since this release

natural-keys 2.1.0 improves natural key detection and handling, particularly for null relationships. Otherwise, this release is essentially compatible with natural-keys 2.0.0, but note the type change for the output of natural_key().

All changes by @sheppard.

  • Don't crash when serializing models with null foreign keys (#18, bbe6f64)
  • Return a Python tuple instead of a list from natural_key() and get_natural_key_fields(). The documentation already assumes tuple output, as that is a more correct type for these values. This change should not affect normal usage. (bbe6f64)
  • Don't automatically build nested natural key serializers for reverse relationships (142ffd0)
  • Allow overriding natural key detection via NaturalKeyModelSerializer.is_natural_key_model() (86958a7)
  • Update code style, switch to pyproject.toml, and test with latest Python and Django versions (309fcee, 4e4fa11)