[Python-modules-team] Bug#749543: python-django-debug-toolbar: doesn't work with python-django from jessie or wheezy-backports

Uwe Kleine-König uwe+debian at kleine-koenig.org
Tue May 27 20:48:57 UTC 2014


Package: python-django-debug-toolbar
Version: 1:0+git201107220111-96e46c6-1
Severity: normal
Tags: patch
Control: fixed -1 1:1.2-1

Hello,

With python-django 1.6.5-1~bpo70+1 from wheezy-backports the
debug-toolbar doesn't appear without any error.
The python-django-debug-toolbar/jessie works fine, though.

The problem is that debug_toolbar/middleware.py (and one other file) has:

	from django.conf.urls.defaults import include, patterns

while Django 1.6 doesn't have this module any more. And also Django 1.6
doesn't provide django.utils.hashcompat any more making

	from django.utils.hashcompat import sha_constructor

fail (in two files).

When changing these lines to

	from django.conf.urls import include, patterns

and

	from hashlib import sha1 as sha_constructor

respectively, the toolbar starts working again.

django.conf.urls provides include and patterns since Django 1.4,
hashlib.sha1 exists since Python 2.5. So if you consider this bug worth
fixing for wheezy, the two suggested changes should be safe.
Additionally making python-django break python-django-debug-toolbar (<<
$version_to_be_determined) would be nice.

Best regards
Uwe



More information about the Python-modules-team mailing list