--
Ticket URL: <https://code.djangoproject.com/ticket/23893>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => mhall1
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/23893#comment:1>
* cc: mhall1 (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/23893#comment:2>
Comment (by mhall1):
Unable to reproduce on python 2.7 using MySQLdb connector or python 3.4
using mysqlclient connector. @timgraham, do you have any more information
about the environment this occurred under?
--
Ticket URL: <https://code.djangoproject.com/ticket/23893#comment:3>
Comment (by timgraham):
I can reproduce with both of those configurations using `python -Wall
runtests.py --settings=test_mysql custom_lookups`
--
Ticket URL: <https://code.djangoproject.com/ticket/23893#comment:4>
Comment (by mhall1):
Thanks. I can reproduce it now. I was missing the -Wall flag.
--
Ticket URL: <https://code.djangoproject.com/ticket/23893#comment:5>
Comment (by mhall1):
It looks like the fix for #23714 (line 1402 in
django/db/models/fields/__init__.py) is catching an AttributeError and
mistakenly raising the warning, when the error text is "'DateTimeField'
object has no attribute 'model'" (rather than it being error from pytz).
I'm not so familiar with the codebase yet, but I'll keep looking into it.
--
Ticket URL: <https://code.djangoproject.com/ticket/23893#comment:6>
Comment (by mhall1):
I have a patch available here:
https://github.com/mhall1/django/tree/ticket_23893
Tests passing on python2.7 and python3.4 with mysql backend.
Not sure if its overkill to have a regression test testing a unit test?
--
Ticket URL: <https://code.djangoproject.com/ticket/23893#comment:7>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/23893#comment:8>
* stage: Accepted => Ready for checkin
Comment:
[https://github.com/django/django/pull/3737 PR #3737] LGTM.
--
Ticket URL: <https://code.djangoproject.com/ticket/23893#comment:9>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"4fada6f1c9930e589aebe8bdfb5795f69d253c07"]:
{{{
#!CommitTicketReference repository=""
revision="4fada6f1c9930e589aebe8bdfb5795f69d253c07"
Fixed #23893: Added tzinfo to constant datetime in unit test
Added tzinfo to y2k constant (01/01/2000) in
custom_lookups.tests.DateTimeLookupTests.test_datetime_output_field
to fix warning message regarding naive datetimes.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23893#comment:10>
Comment (by Aymeric Augustin <aymeric.augustin@…>):
In [changeset:"2cb9d984cf7a0965ca6b1322ab836d56278f8749"]:
{{{
#!CommitTicketReference repository=""
revision="2cb9d984cf7a0965ca6b1322ab836d56278f8749"
Merge pull request #3737 from mhall1/ticket_23893
Fixed #23893: Added tzinfo to constant datetime in unit test
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23893#comment:11>