[Django] #21095: Release notes and documentation don't mention queryset week_day breakage on mysql if you haven't loaded tzinfo

17 views
Skip to first unread message

Django

unread,
Sep 11, 2013, 10:45:55 PM9/11/13
to django-...@googlegroups.com
#21095: Release notes and documentation don't mention queryset week_day breakage on
mysql if you haven't loaded tzinfo
-------------------------------+--------------------------
Reporter: mattaustin | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.6-beta-1
Severity: Normal | Keywords: releasenotes
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------
When switching to Django 1.6b2, queries such as
{{{MyModel.objects.filter(start_at__week_day=1)}}} started returning empty
querysets. After investigation, it turned out I had to load tzinfo in to
the database, as described at
https://docs.djangoproject.com/en/1.6/ref/models/querysets/#database-time-
zone-definitions. Although the release notes mention this is required for
the new QuerySet.datetimes() functionality, there was nothing mentioning
it was required for using week_day lookups.

As this could break previously working projects with Django 1.5, it should
probably be made clear in the release notes and queryset documentation.

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

Django

unread,
Sep 12, 2013, 6:06:20 AM9/12/13
to django-...@googlegroups.com
#21095: Release notes and documentation don't mention queryset week_day breakage on
mysql if you haven't loaded tzinfo
---------------------------------+--------------------------------------
Reporter: mattaustin | Owner: aaugustin
Type: Bug | Status: assigned
Component: Documentation | Version: 1.6-beta-1
Severity: Release blocker | Resolution:

Keywords: releasenotes | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by aaugustin):

* status: new => assigned
* severity: Normal => Release blocker
* needs_better_patch: => 0
* needs_tests: => 0
* owner: nobody => aaugustin
* needs_docs: => 0


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

Django

unread,
Sep 12, 2013, 9:38:47 AM9/12/13
to django-...@googlegroups.com
#21095: Release notes and documentation don't mention queryset week_day breakage on
mysql if you haven't loaded tzinfo
---------------------------------+--------------------------------------
Reporter: mattaustin | Owner: aaugustin
Type: Bug | Status: assigned
Component: Documentation | Version: 1.6-beta-1
Severity: Release blocker | Resolution:

Keywords: releasenotes | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------

Comment (by anonymous):

I've added some notes for the requirement of database time zone
definitions for day, month, and week_day lookups.

Pull request for master (will also need to be cherry-picked to
stable-1.6.x / stable-1.7.x branches):
https://github.com/django/django/pull/1620

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

Django

unread,
Sep 12, 2013, 11:32:06 AM9/12/13
to django-...@googlegroups.com
#21095: Release notes and documentation don't mention queryset week_day breakage on
mysql if you haven't loaded tzinfo
---------------------------------+--------------------------------------
Reporter: mattaustin | Owner: aaugustin
Type: Bug | Status: assigned
Component: Documentation | Version: 1.6-beta-1
Severity: Release blocker | Resolution:
Keywords: releasenotes | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by timo):

* has_patch: 0 => 1
* stage: Unreviewed => Accepted


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

Django

unread,
Sep 13, 2013, 4:14:24 AM9/13/13
to django-...@googlegroups.com
#21095: Release notes and documentation don't mention queryset week_day breakage on
mysql if you haven't loaded tzinfo
-------------------------------------+-------------------------------------

Reporter: mattaustin | Owner: aaugustin
Type: Bug | Status: assigned
Component: Documentation | Version:
Severity: Release blocker | 1.6-beta-1
Keywords: releasenotes | Resolution:
Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 1 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* stage: Accepted => Ready for checkin


Comment:

Pull request looks good, I'll edit it a bit to provide the solution
immediately instead of redirecting the user to another page.

This creates a bit of duplications but it's only two lines and it doesn't
matter if it goes stale; the release notes only need to stay accurate
while the release is supported.

--
Ticket URL: <https://code.djangoproject.com/ticket/21095#comment:4>

Django

unread,
Sep 13, 2013, 4:19:40 AM9/13/13
to django-...@googlegroups.com
#21095: Release notes and documentation don't mention queryset week_day breakage on
mysql if you haven't loaded tzinfo
-------------------------------------+-------------------------------------
Reporter: mattaustin | Owner: aaugustin
Type: Bug | Status: closed

Component: Documentation | Version:
Severity: Release blocker | 1.6-beta-1
Keywords: releasenotes | Resolution: fixed

Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 1 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Aymeric Augustin <aymeric.augustin@…>):

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


Comment:

In [changeset:"9451d8d558e6dafa4e270c33608a291610ccf77d"]:
{{{
#!CommitTicketReference repository=""
revision="9451d8d558e6dafa4e270c33608a291610ccf77d"
Fixed #21095 -- Documented new requirement for dates lookups.

Day, month, and week_day lookups now require time zone definitions in the
database.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21095#comment:5>

Django

unread,
Sep 13, 2013, 4:20:33 AM9/13/13
to django-...@googlegroups.com
#21095: Release notes and documentation don't mention queryset week_day breakage on
mysql if you haven't loaded tzinfo
-------------------------------------+-------------------------------------
Reporter: mattaustin | Owner: aaugustin
Type: Bug | Status: closed
Component: Documentation | Version:
Severity: Release blocker | 1.6-beta-1
Keywords: releasenotes | Resolution: fixed
Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 1 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Aymeric Augustin <aymeric.augustin@…>):

In [changeset:"a929adfd3b89056d83c34f729bedde78afec44db"]:
{{{
#!CommitTicketReference repository=""
revision="a929adfd3b89056d83c34f729bedde78afec44db"
[1.6.x] Fixed #21095 -- Documented new requirement for dates lookups.

Day, month, and week_day lookups now require time zone definitions in the
database.

Backport of 9451d8d from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21095#comment:6>

Reply all
Reply to author
Forward
0 new messages