Closed Bug 1054001 Opened 10 years ago Closed 9 years ago

django.conf.urls.defaults warnings

Categories

(Input Graveyard :: Code Quality, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: rrosario)

References

Details

(Whiteboard: u=dev c=codequality p=2 s=input.2015q1)

If you run Input like this:

    python -W all manage.py runserver

it prints out some stuff that isn't interesting. But then it prints this:

/home/willkg/mozilla/fjord/vendor/src/django/django/conf/urls/defaults.py:3: DeprecationWarning: django.conf.urls.defaults is deprecated; use django.conf.urls instead
  DeprecationWarning)


I did a grep for "django.conf.urls.defaults" and the fjord code is fine, but there's a bunch of stuff in vendor/ that's not fine:

./vendor/src/django-adminplus/adminplus/__init__.py:
   32 :         from django.conf.urls.defaults import patterns, url

./vendor/src/django-browserid/django_browserid/tests/urls.py:
    4 : from django.conf.urls.defaults import include, patterns, url
./vendor/src/django-browserid/django_browserid/urls.py:
   10 :     from django.conf.urls.defaults import patterns, url

./vendor/src/django-celery/djcelery/monproj/urls.py:
    7 :     from django.conf.urls.defaults import (patterns, include, url,  # noqa
./vendor/src/django-celery/djcelery/urls.py:
   19 :     from django.conf.urls.defaults import patterns, url  # noqa

./vendor/src/django-grappelli/grappelli/urls.py:
    8 :     from django.conf.urls.defaults import url, patterns

This one is probably fine:

./vendor/src/django-rest-framework/rest_framework/compat.py:
   22 :     from django.conf.urls.defaults import patterns, url, include


It kind of looks like we need to update the following:

* django-adminplus
* django-browserid
* django-celery (this actually goes away with more recent versions of celery)
* django-grappelli (this is locked to the django version)
Whiteboard: u=dev c=codequality p= s=input.2014q4
Bumping this to 2015q1 because we're out of time for this quarter.
Whiteboard: u=dev c=codequality p= s=input.2014q4 → u=dev c=codequality p= s=input.2015q1
We're going to need to do this before we can upgrade to Django 1.7.
Blocks: 1118765
Looking at this next.
Assignee: nobody → rrosario
(In reply to Will Kahn-Greene [:willkg] from comment #0)
> ./vendor/src/django-adminplus/adminplus/__init__.py:
>    32 :         from django.conf.urls.defaults import patterns, url

The version of django-adminplus being used now is fine:

    (fjord)[rlr (bd8af7b...) django-adminplus]$ git grep 'from django.conf.urls'
    adminplus/sites.py:        from django.conf.urls import patterns, url
    test_urlconf.py:from django.conf.urls import patterns, url, include
PR for updating django-browserid to v0.11:
https://github.com/mozilla/fjord/pull/458
The instances of `from django.conf.urls.defaults import` in the django-celery we are currently using are just fallbacks for backwards compatibility.
(In reply to Ricky Rosario [:rrosario, :r1cky] from comment #6)
> The instances of `from django.conf.urls.defaults import` in the
> django-celery we are currently using are just fallbacks for backwards
> compatibility.

And... same thing with django-grapelli. WOOT. Looks like we are good once we get django-browserid upgraded.
Awesome!
Pretty sure we are done here. My (limited) grep-fu didn't find any more instances and running the devserver I wasn't able to trigger the warning.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
This was about 2pts
Whiteboard: u=dev c=codequality p= s=input.2015q1 → u=dev c=codequality p=2 s=input.2015q1
At worst, we'll find out we missed something when we upgrade, but it'll likely be pretty minimal.

You rock!
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.