#19738: "manage.py shell" on a fresh project raises RuntimeWarning about naive
datetime, if IPython is installed
-----------------------------------------+------------------------
               Reporter:  carljm         |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  new
              Component:  Uncategorized  |        Version:  1.4
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 IPython uses SQLite internally to store shell session history. At the
 beginning and end of every shell session, it issues a SQLite query to
 get/save the history. For some reason this query includes a (timezone-
 naive) datetime.

 Django's SQLite DB backend registers a global datetime adapter function
 which issues a warning in case it receives a naive datetime when timezone
 support is activated.

 In combination, this means that on a fresh `startproject` if you fire up
 `manage.py shell` without making a single change to settings, if IPython
 is installed you'll get "RuntimeWarning: SQLite received a naive datetime
 (2013-02-04 17:14:13.070091) while time zone support is active." on shell
 startup and exit. That's an ugly experience for a newcomer to Django - it
 _looks_ to them as if Django is shipping a broken setup by default.

 Probably this is Django's fault for registering a potentially-noisy
 process-global SQLite adapter, and we should consider whether to just
 remove that warning in the adapter. The model layer will already warn
 about naive datetimes, so this warning is only needed for raw SQL.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to