Bug revealed by running `./runtests.py ordering.test --reverse`
(reproduced at a2c31e12da272acc76f3a3a0157fae9a7f6477ac).
It seems that test added in f218a2ff455b5f7391dd38038994f2c5f8b0eca1
wasn't correct because order mutates on queryset execution in
[https://github.com/django/django/blob/a2c31e12da272acc76f3a3a0157fae9a7f6477ac/django/db/models/sql/compiler.py#L253
SQLCompiler.get_order_by()].
--
Ticket URL: <https://code.djangoproject.com/ticket/30501>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "30501.diff" added.
Tests.
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/11405 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/30501#comment:1>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/30501#comment:2>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"f8b8b00f0197e52f7a0986fae51462be174dbaea" f8b8b00f]:
{{{
#!CommitTicketReference repository=""
revision="f8b8b00f0197e52f7a0986fae51462be174dbaea"
Fixed #30501 -- Preventing QuerySet.reverse() from mutating expressions in
QuerySet.order_by and Meta.ordering.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30501#comment:3>
Comment (by Patryk Zawadzki):
Will this be backported to the 2.2 branch?
--
Ticket URL: <https://code.djangoproject.com/ticket/30501#comment:4>
Comment (by felixxm):
I'm sorry, but this doesn't qualify for a backport.
--
Ticket URL: <https://code.djangoproject.com/ticket/30501#comment:5>