Change django.conf.urls.defaults -> django.conf.urls (djblets)

Review Request #4570 — Created Sept. 15, 2013 and submitted

Information

Djblets
master

Reviewers

Change django.conf.urls.defaults -> django.conf.urls (djblets)

Django 1.4 changed the namespace for 'patterns' and 'url' from
django.conf.urls.defaults to django.conf.urls. This was listed in the
deprecation notes, but we never updated it because 1.4 maintained
compatibility. 1.5 got rid of the compatibility shim, so we need to actually
update now.

  • Ran unit tests
  • Used in conjunction with review board
Description From Last Updated

'handler500' imported but unused

reviewbotreviewbot

'handler404' imported but unused

reviewbotreviewbot

'handler500' imported but unused

reviewbotreviewbot

These are needed. Django will try to import the handler404 and handler500 from this (since it's the root URL processor) …

chipx86chipx86
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    djblets/extensions/urls.py
    djblets/util/misc.py
    djblets/webapi/resources.py
    djblets/testing/urls.py
    djblets/util/rooturl.py
    djblets/extensions/tests.py
    djblets/extensions/test/urls.py
    djblets/extensions/base.py
    djblets/extensions/resources.py
    djblets/feedview/test_urls.py
    djblets/log/urls.py
    Ignored Files:

  2. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    djblets/extensions/urls.py
    djblets/util/misc.py
    djblets/webapi/resources.py
    djblets/testing/urls.py
    djblets/util/rooturl.py
    djblets/extensions/tests.py
    djblets/extensions/test/urls.py
    djblets/extensions/base.py
    djblets/extensions/resources.py
    djblets/feedview/test_urls.py
    djblets/log/urls.py
    Ignored Files:

  2. djblets/feedview/test_urls.py (Diff revision 1)
     
     
    Show all issues

    'handler500' imported but unused

  3. djblets/util/rooturl.py (Diff revision 1)
     
     
    Show all issues

    'handler404' imported but unused

  4. djblets/util/rooturl.py (Diff revision 1)
     
     
    Show all issues

    'handler500' imported but unused

  5. 
      
david
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    djblets/extensions/urls.py
    djblets/util/misc.py
    djblets/webapi/resources.py
    djblets/testing/urls.py
    djblets/util/rooturl.py
    djblets/extensions/tests.py
    djblets/extensions/test/urls.py
    djblets/extensions/base.py
    djblets/extensions/resources.py
    djblets/feedview/test_urls.py
    djblets/log/urls.py
    Ignored Files:

  2. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    djblets/extensions/urls.py
    djblets/util/misc.py
    djblets/webapi/resources.py
    djblets/testing/urls.py
    djblets/util/rooturl.py
    djblets/extensions/tests.py
    djblets/extensions/test/urls.py
    djblets/extensions/base.py
    djblets/extensions/resources.py
    djblets/feedview/test_urls.py
    djblets/log/urls.py
    Ignored Files:

  2. 
      
chipx86
  1. 
      
  2. djblets/util/rooturl.py (Diff revision 2)
     
     
    Show all issues

    These are needed. Django will try to import the handler404 and handler500 from this (since it's the root URL processor) on 404s and 500s.

    1. I'm not sure I follow. In the Django source, it only imports these from django.conf.urls, and everything seems to work fine without these.

    2. It might be fine, but I'm not yet convinced. The docs claim it pulls them initially from the root URL resolver, which is this file. This was once broken, and I fixed it by adding these imports as per the docs (way back when). I want to be 100% sure things work correctly in both debug and non-debug setups before making this change.

  3. 
      
david
chipx86
  1. Ship It!

  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (700c3e8).

Loading...