--
Ticket URL: <https://code.djangoproject.com/ticket/24822>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted
Comment:
Not sure the best to fix this.
--
Ticket URL: <https://code.djangoproject.com/ticket/24822#comment:1>
--
Ticket URL: <https://code.djangoproject.com/ticket/24822#comment:2>
* component: Migrations => Documentation
Comment:
First, it's a rather uncommon use case to define an explicit datetime
instead of `now` (i.e. a function). Second, I only see a possible fix by
special casing datetime handling. That said, I think we should document
this behavior as a known shortcoming until we find a suitable and
practical solution.
--
Ticket URL: <https://code.djangoproject.com/ticket/24822#comment:3>
* status: new => closed
* resolution: => invalid
Comment:
This ticket is not valid anymore. Python 3.5+ no longer raises `TypeError`
when comparing naive and aware `datetimes`:
{{{
Python 3.5.10 (default, Jan 25 2021, 09:05:45)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> import pytz
>>> default=datetime(2015, 7, 4, 8, 0 )
>>> default2=datetime(2015, 7, 4, 8, 0, tzinfo=pytz.UTC)
>>> default != default2
True
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24822#comment:4>