Bug 1033898 - DeprecationWarnings django.conf.urls.defaults
Summary: DeprecationWarnings django.conf.urls.defaults
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-django-debug-toolbar
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Runge
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1023925
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-24 08:00 UTC by Matěj Cepl
Modified: 2018-04-11 11:50 UTC (History)
5 users (show)

Fixed In Version: python-django-debug-toolbar-1.0-1.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-02 20:29:48 UTC
Type: Bug


Attachments (Terms of Use)

Description Matěj Cepl 2013-11-24 08:00:21 UTC
Description of problem:
When doing just an Polls application from https://docs.djangoproject.com/en/1.4/intro/tutorial01/ I get these DepreceationWarnings when running

python manage.py shell # from "Playing with API" step

matej@wycliff: testproject$ python manage.py shell
/usr/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py:53: RuntimeWarning: SQLite received a naive datetime (2013-11-24 08:49:20.051801) while time zone support is active.
  RuntimeWarning)

/usr/lib/python2.7/site-packages/IPython/frontend/terminal/embed.py:239: DeprecationWarning: With-statements now directly support multiple context managers
  with nested(self.builtin_trap, self.display_trap):

Python 2.7.5 (default, Nov  6 2013, 23:28:41) 
Type "copyright", "credits" or "license" for more information.

IPython 0.13.2 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: 

also when running my own app (from 1.3) I get

./usr/lib/python2.7/site-packages/django/conf/urls/defaults.py:3: DeprecationWarning: django.conf.urls.defaults is deprecated; use django.conf.urls instead
DeprecationWarning)

although I don't have any django.con.urls.defaults in my code (checked with grep)

Version-Release number of selected component (if applicable):
python-django-1.5.5-2.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1.see above
2.
3.

Actual results:
plenty of DepreceationWarnings (even in plain Django app without any external applications)

Expected results:
no warnings

Additional info:

Comment 1 Miro Hrončok 2013-11-24 12:33:24 UTC
python-django-1.5.5-2.el7.noarch(In reply to Matěj Cepl from comment #0)
> Version-Release number of selected component (if applicable):
> python-django-1.5.5-2.el7.noarch

Are you sure we are on Fedora here?

Comment 2 Matěj Cepl 2013-11-24 17:10:54 UTC
(In reply to Miro Hrončok from comment #1)
> python-django-1.5.5-2.el7.noarch(In reply to Matěj Cepl from comment #0)
> > Version-Release number of selected component (if applicable):
> > python-django-1.5.5-2.el7.noarch
> 
> Are you sure we are on Fedora here?

Yes, it is my recompile of Rawhide package. You can easily find out (if you don't know let me know) that Django has never been built for RHEL.

Comment 3 Miro Hrončok 2013-11-24 17:28:55 UTC
No problem, I was just confused with the dist tag.

Comment 4 Matěj Cepl 2013-11-24 17:39:59 UTC
(In reply to Matěj Cepl from comment #0)
> Description of problem:
> When doing just an Polls application from
> https://docs.djangoproject.com/en/1.4/intro/tutorial01/ I get these
> DepreceationWarnings when running
> 
> python manage.py shell # from "Playing with API" step
> 
> matej@wycliff: testproject$ python manage.py shell
> /usr/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py:53:
> RuntimeWarning: SQLite received a naive datetime (2013-11-24
> 08:49:20.051801) while time zone support is active.
>   RuntimeWarning)

Actually, this one is the upstream bug https://code.djangoproject.com/ticket/19738, which has been resolved (correctly) yet.

> /usr/lib/python2.7/site-packages/IPython/frontend/terminal/embed.py:239:
> DeprecationWarning: With-statements now directly support multiple context
> managers
>   with nested(self.builtin_trap, self.display_trap):

This one is https://code.djangoproject.com/ticket/19789 (more or less WONTFIXed), although it has been closed because of https://code.djangoproject.com/ticket/19737 which has been then WONTFIXed as well :(

> also when running my own app (from 1.3) I get
> 
> ./usr/lib/python2.7/site-packages/django/conf/urls/defaults.py:3:
> DeprecationWarning: django.conf.urls.defaults is deprecated; use
> django.conf.urls instead
> DeprecationWarning)
> 
> although I don't have any django.con.urls.defaults in my code (checked with
> grep)

And this is a bug not in django itself, but in python-django-debug-toolbar:

matej@wycliff: python-django-debug-toolbar (master %)$ ack --python defaults
django-debug-toolbar-0.9.4/tests/urls.py
7:from django.conf.urls.defaults import *

django-debug-toolbar-0.9.4/debug_toolbar/urls.py
7:from django.conf.urls.defaults import *

django-debug-toolbar-0.9.4/build/lib/debug_toolbar/urls.py
7:from django.conf.urls.defaults import *
matej@wycliff: python-django-debug-toolbar (master %)$ 

Fixing the component of this bug accordingly.

Comment 5 Matěj Cepl 2013-11-24 17:44:19 UTC
This has been probably fixed in the upstream https://github.com/django-debug-toolbar/django-debug-toolbar/issues/363


Note You need to log in before you can comment on or make changes to this bug.