[Django] #23876: SQLAggregateCompiler.as_sql() accepts a compiler arg that it doesn't use

10 views
Skip to first unread message

Django

unread,
Nov 20, 2014, 6:17:15 AM11/20/14
to django-...@googlegroups.com
#23876: SQLAggregateCompiler.as_sql() accepts a compiler arg that it doesn't use
-------------------------------------+-------------------------------------
Reporter: carljm | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: 1.6
Component: Database | Keywords:
layer (models, ORM) | Has patch: 0
Severity: Normal | Needs tests: 0
Triage Stage: | Easy pickings: 0
Unreviewed |
Needs documentation: 0 |
Patch needs improvement: 0 |
UI/UX: 0 |
-------------------------------------+-------------------------------------
It even goes to the trouble of setting the `compiler` arg to `self` if one
wasn't passed in; but then `compiler` is never used in the method.

Many of the other SQLCompiler subclasses have `as_sql` methods that don't
accept `compiler`, so it doesn't appear to be an invariant.

Test suite lasses without that argument, at least on SQLite. Will push a
cleanup PR to check if anything else breaks on CI.

--
Ticket URL: <https://code.djangoproject.com/ticket/23876>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 20, 2014, 6:19:04 AM11/20/14
to django-...@googlegroups.com
#23876: SQLAggregateCompiler.as_sql() accepts a compiler arg that it doesn't use
-------------------------------------+-------------------------------------
Reporter: carljm | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: 1.6
Component: Database layer | Resolution:
(models, ORM) | Triage Stage:
Severity: Normal | Unreviewed
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by carljm):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/3584

--
Ticket URL: <https://code.djangoproject.com/ticket/23876#comment:1>

Django

unread,
Nov 20, 2014, 7:02:59 AM11/20/14
to django-...@googlegroups.com
#23876: SQLAggregateCompiler.as_sql() accepts a compiler arg that it doesn't use
-------------------------------------+-------------------------------------
Reporter: carljm | Owner: nobody
Type: | Status: closed
Cleanup/optimization | Version: 1.6
Component: Database layer | Resolution: fixed

(models, ORM) | Triage Stage:
Severity: Normal | Unreviewed
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by Carl Meyer <carl@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"d6e2bbe734fe65f1cec825b9c507ad7bbb09f2f0"]:
{{{
#!CommitTicketReference repository=""
revision="d6e2bbe734fe65f1cec825b9c507ad7bbb09f2f0"
Fixed #23876 -- Removed dead code in SQLAggregateCompiler.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23876#comment:2>

Reply all
Reply to author
Forward
0 new messages