* status: new => closed
* type: Bug => New feature
* resolution: => wontfix
Comment:
Thanks for this ticket, however as far as I'm aware it's not feasible to
compare two queryset in a performant way (see also
[https://groups.google.com/g/django-developers/c/M_x4BbNta24/m/c5SZD-
uIAQAJ Adam's comment]). This should take into account all
[https://github.com/django/django/blob/34e2148fc725e7200050f74130d7523e3cd8507a/django/db/models/query.py#L291-L304
advanced options] (e.g. used expressions, prefetching, chosen fields,
etc.) and be preceded by an implementation of `==` operator for the
`Query` class which is even
[https://github.com/django/django/blob/34e2148fc725e7200050f74130d7523e3cd8507a/django/db/models/sql/query.py#L161-L228
more complicated]. Comparing the results is not an option because two
completely different queryset can return the same results.
IMO it's not worth the maintenance burden. You can always implement your
own hook if comparing results suits you.
--
Ticket URL: <https://code.djangoproject.com/ticket/33698#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.