Skip to content

py-v1.13.6

Choose a tag to compare

@github-actions github-actions released this 28 Oct 04:56
· 25 commits to main since this release
ce15bd8

Fixed

  • nplusone skipped loops over sliced QuerySets (#145). Iterating
    Post.objects.filter(...)[:50] is still lazy and can cause one related
    lookup per row; it now produces the same finding and eager-loading
    suggestion as an unsliced QuerySet. A slice of a slice
    (qs[:50][:10]) is unwrapped too.

  • nplusone flagged nested relations already prefetched by the outer
    queryset (#146).
    Nested loops now inherit explicit eager-loading paths
    from their enclosing queryset. Suggestions retain the full schema-validated
    relation path, such as product__category, and partial prefetches still
    report the relations that remain unloaded. Prefetch-cache coverage now follows
    supported documented queryset operations on related managers, classifying
    ordering- and emptiness-dependent cases conservatively while retaining findings
    for non-cache-served operations and using schema-backed receiver checks to
    preserve loaded relation prefixes for calls on other receivers.