[Django] #23867: Remove hacks required by .dates() queries

13 views
Skip to first unread message

Django

unread,
Nov 19, 2014, 1:08:44 AM11/19/14
to django-...@googlegroups.com
#23867: Remove hacks required by .dates() queries
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Database | Keywords:
layer (models, ORM) | Has patch: 0
Severity: Normal | Needs tests: 0
Triage Stage: Ready for | Easy pickings: 0
checkin |
Needs documentation: 0 |
Patch needs improvement: 0 |
UI/UX: 0 |
-------------------------------------+-------------------------------------
The dates() queries implementation uses custom QuerySet, Query and
Compiler classes. Before expressions and database value converters were
added there were no other way to convert the database values than addition
of these subclasses to hack around the limitations in Django. But now with
expressions and converters support it is possible to implement the dates
queries by using public APIs only.

This is implemented in https://github.com/django/django/pull/3570.

As I don't think anybody wants to keep the old way around, and also I
think the patch is ready for merge, so I'll mark this directly as ready
for checkin.

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

Django

unread,
Nov 26, 2014, 5:50:28 PM11/26/14
to django-...@googlegroups.com
#23867: Remove hacks required by .dates() queries
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: | Status: closed
Cleanup/optimization | Version: master
Component: Database layer | Resolution: fixed
(models, ORM) | Triage Stage: Ready for
Severity: Normal | checkin
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"cbb5cdd155668ba771cad6b975676d3b20fed37b"]:
{{{
#!CommitTicketReference repository=""
revision="cbb5cdd155668ba771cad6b975676d3b20fed37b"
Fixed #23867 -- removed DateQuerySet hacks

The .dates() queries were implemented by using custom Query, QuerySet,
and Compiler classes. Instead implement them by using expressions and
database converters APIs.
}}}

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

Django

unread,
Apr 18, 2015, 10:14:43 AM4/18/15
to django-...@googlegroups.com
#23867: Remove hacks required by .dates() queries
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"e9fdecf98417e39a93c81a854a780550321a9795" e9fdecf9]:
{{{
#!CommitTicketReference repository=""
revision="e9fdecf98417e39a93c81a854a780550321a9795"
Removed DateTimeQuerySet from docs.

Obsolete since refs #23867.
}}}

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

Django

unread,
Apr 18, 2015, 10:14:53 AM4/18/15
to django-...@googlegroups.com
#23867: Remove hacks required by .dates() queries
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"ae47854a25db7770590ddd556bc457b8cada18ae" ae47854]:
{{{
#!CommitTicketReference repository=""
revision="ae47854a25db7770590ddd556bc457b8cada18ae"
[1.8.x] Removed DateTimeQuerySet from docs.

Obsolete since refs #23867.

Backport of e9fdecf98417e39a93c81a854a780550321a9795 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23867#comment:3>

Reply all
Reply to author
Forward
0 new messages