Opened 10 years ago

Closed 10 years ago

#23659 closed Bug (fixed)

Lost annotation ordering with values_list() and annotate()

Reported by: Claude Paroz Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When I'm aggregating with values_list() and then annotate with a list of clauses, I'd expect the annotate *args ordering to be respected in the resulting lists. Unfortunately, annotate() args ordering is currently discarded because all annotations parameters are consolidated in a plain dict.

Change History (6)

comment:2 by Simon Charette, 10 years ago

Triage Stage: UnreviewedReady for checkin
Version: 1.7master

It's also what I would expect from values_list() and annotate() chaining.

Patch LGTM, CI failures look unrelated.

comment:3 by Simon Charette, 10 years ago

Triage Stage: Ready for checkinAccepted

Loïc raised an issue on the PR that must be addressed before merging.

comment:4 by Claude Paroz, 10 years ago

Issue addressed, test suite OK.

comment:5 by Simon Charette, 10 years ago

Triage Stage: AcceptedReady for checkin

Except the two flake8 warnings the patch is RFC.

comment:6 by Claude Paroz <claude@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 374c14b7fd8a7ba06cebfa83dd40915a50796d3e:

Fixed #23659 -- Kept annotate() args ordering

Thanks Loic Bistuer and Simon Charette for the review.

Note: See TracTickets for help on using tickets.
Back to Top