Package: graphite-web Followup-For: Bug #729854 Hi,
same problem here. I have created a patch that fixes the issue for me. Basically it takes the patch Tom proposed and drops the changes in manage.py, as those have happened somewhere else. I also adapted bin/graphite-manage to Django 1.6 Regards, Bernhard -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (900, 'testing'), (800, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.10-3-amd64 (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff --git a/debian/bin/graphite-manage b/debian/bin/graphite-manage index fc6bc9e..b933496 100755 --- a/debian/bin/graphite-manage +++ b/debian/bin/graphite-manage @@ -1,12 +1,15 @@ #!/usr/bin/env python -from django.core.management import execute_manager +import os +import sys + try: import graphite.settings # Assumed to be in the same directory. except ImportError: - import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) sys.exit(1) if __name__ == "__main__": - execute_manager(graphite.settings) + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "graphite.settings") + from django.core.management import execute_from_command_line + execute_from_command_line(sys.argv) diff --git a/debian/changelog b/debian/changelog index 7d09db0..b805b66 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +graphite-web (0.9.12+debian-2~1.gbpcc7405) UNRELEASED; urgency=low + + ** SNAPSHOT build @cc74059fda505ab9e5c5d1100ce01c699d8b5895 ** + + * Import upstream patch to fix Django 1.6 compatibility + * drop part about webapp/graphite/manage.py from patch, included upstream + * changelog + * graphite-manage: fix Django 1.6 compatibility + + -- Bernhard Schmidt <bernhard.schm...@lrz.de> Mon, 18 Nov 2013 16:58:56 +0100 + graphite-web (0.9.12+debian-1) unstable; urgency=high * New Upstream Version (Closes: #720454, #721085) diff --git a/debian/patches/django1.6_compatibility.patch b/debian/patches/django1.6_compatibility.patch new file mode 100644 index 0000000..f06364c --- /dev/null +++ b/debian/patches/django1.6_compatibility.patch @@ -0,0 +1,175 @@ +From fc3f018544c19b90cc63797d18970a4cc27ef2ad Mon Sep 17 00:00:00 2001 +From: Victor Bazterra <victor.bazte...@mathworks.com> +Date: Mon, 19 Aug 2013 09:56:20 -0400 +Subject: [PATCH] Changes needed to run without warning using django 1.5. + +--- + webapp/graphite/account/urls.py | 2 +- + webapp/graphite/browser/urls.py | 2 +- + webapp/graphite/cli/urls.py | 2 +- + webapp/graphite/composer/urls.py | 2 +- + webapp/graphite/dashboard/urls.py | 2 +- + webapp/graphite/events/urls.py | 2 +- + webapp/graphite/graphlot/urls.py | 2 +- + webapp/graphite/manage.py | 4 +++- + webapp/graphite/metrics/urls.py | 2 +- + webapp/graphite/render/urls.py | 2 +- + webapp/graphite/urls.py | 2 +- + webapp/graphite/version/urls.py | 2 +- + webapp/graphite/whitelist/urls.py | 2 +- + 13 files changed, 15 insertions(+), 13 deletions(-) + +diff --git a/webapp/graphite/account/urls.py b/webapp/graphite/account/urls.py +index 18d75e2..33ba628 100644 +--- a/webapp/graphite/account/urls.py ++++ b/webapp/graphite/account/urls.py +@@ -12,7 +12,7 @@ + See the License for the specific language governing permissions and + limitations under the License.""" + +-from django.conf.urls.defaults import * ++from django.conf.urls import * + + urlpatterns = patterns('graphite.account.views', + ('^login/?$', 'loginView'), +diff --git a/webapp/graphite/browser/urls.py b/webapp/graphite/browser/urls.py +index 1e85f19..bc38a7d 100644 +--- a/webapp/graphite/browser/urls.py ++++ b/webapp/graphite/browser/urls.py +@@ -12,7 +12,7 @@ + See the License for the specific language governing permissions and + limitations under the License.""" + +-from django.conf.urls.defaults import * ++from django.conf.urls import * + + urlpatterns = patterns('graphite.browser.views', + ('^header/?$', 'header'), +diff --git a/webapp/graphite/cli/urls.py b/webapp/graphite/cli/urls.py +index 8d41d52..24ca6c2 100644 +--- a/webapp/graphite/cli/urls.py ++++ b/webapp/graphite/cli/urls.py +@@ -12,7 +12,7 @@ + See the License for the specific language governing permissions and + limitations under the License.""" + +-from django.conf.urls.defaults import * ++from django.conf.urls import * + + urlpatterns = patterns('graphite.cli.views', + (r'^autocomplete/?$', 'autocomplete'), +diff --git a/webapp/graphite/composer/urls.py b/webapp/graphite/composer/urls.py +index a4e12ae..ced26da 100644 +--- a/webapp/graphite/composer/urls.py ++++ b/webapp/graphite/composer/urls.py +@@ -12,7 +12,7 @@ + See the License for the specific language governing permissions and + limitations under the License.""" + +-from django.conf.urls.defaults import * ++from django.conf.urls import * + + urlpatterns = patterns('graphite.composer.views', + ('send_email','send_email'), +diff --git a/webapp/graphite/dashboard/urls.py b/webapp/graphite/dashboard/urls.py +index 98351f2..a63b302 100644 +--- a/webapp/graphite/dashboard/urls.py ++++ b/webapp/graphite/dashboard/urls.py +@@ -1,4 +1,4 @@ +-from django.conf.urls.defaults import * ++from django.conf.urls import * + + urlpatterns = patterns('graphite.dashboard.views', + ('^save/(?P<name>[^/]+)', 'save'), +diff --git a/webapp/graphite/events/urls.py b/webapp/graphite/events/urls.py +index 3584eba..3dce41e 100644 +--- a/webapp/graphite/events/urls.py ++++ b/webapp/graphite/events/urls.py +@@ -12,7 +12,7 @@ + See the License for the specific language governing permissions and + limitations under the License.""" + +-from django.conf.urls.defaults import * ++from django.conf.urls import * + + urlpatterns = patterns('graphite.events.views', + ('^get_data?$', 'get_data'), +diff --git a/webapp/graphite/graphlot/urls.py b/webapp/graphite/graphlot/urls.py +index 7ff1cde..f946a69 100644 +--- a/webapp/graphite/graphlot/urls.py ++++ b/webapp/graphite/graphlot/urls.py +@@ -12,7 +12,7 @@ + See the License for the specific language governing permissions and + limitations under the License.""" + +-from django.conf.urls.defaults import * ++from django.conf.urls import * + + urlpatterns = patterns('graphite.graphlot.views', + ('^rawdata/?$', 'get_data'), +--- a/webapp/graphite/metrics/urls.py ++++ b/webapp/graphite/metrics/urls.py +@@ -12,7 +12,7 @@ + See the License for the specific language governing permissions and + limitations under the License.""" + +-from django.conf.urls.defaults import * ++from django.conf.urls import * + + urlpatterns = patterns('graphite.metrics.views', + ('^index\.json$', 'index_json'), +diff --git a/webapp/graphite/render/urls.py b/webapp/graphite/render/urls.py +index a94a5d1..724aeda 100644 +--- a/webapp/graphite/render/urls.py ++++ b/webapp/graphite/render/urls.py +@@ -12,7 +12,7 @@ + See the License for the specific language governing permissions and + limitations under the License.""" + +-from django.conf.urls.defaults import * ++from django.conf.urls import * + + urlpatterns = patterns('graphite.render.views', + ('local/?$','renderLocalView'), +diff --git a/webapp/graphite/urls.py b/webapp/graphite/urls.py +index 6ff3598..48bc4eb 100644 +--- a/webapp/graphite/urls.py ++++ b/webapp/graphite/urls.py +@@ -12,7 +12,7 @@ + See the License for the specific language governing permissions and + limitations under the License.""" + +-from django.conf.urls.defaults import * ++from django.conf.urls import * + from django.conf import settings + from django.contrib import admin + +diff --git a/webapp/graphite/version/urls.py b/webapp/graphite/version/urls.py +index 49eea7a..abe884e 100755 +--- a/webapp/graphite/version/urls.py ++++ b/webapp/graphite/version/urls.py +@@ -12,7 +12,7 @@ + See the License for the specific language governing permissions and + limitations under the License.""" + +-from django.conf.urls.defaults import * ++from django.conf.urls import * + + urlpatterns = patterns('graphite.version.views', + ('', 'index'), +diff --git a/webapp/graphite/whitelist/urls.py b/webapp/graphite/whitelist/urls.py +index 8251b51..a551d43 100644 +--- a/webapp/graphite/whitelist/urls.py ++++ b/webapp/graphite/whitelist/urls.py +@@ -12,7 +12,7 @@ + See the License for the specific language governing permissions and + limitations under the License.""" + +-from django.conf.urls.defaults import * ++from django.conf.urls import * + + urlpatterns = patterns('graphite.whitelist.views', + ('add','add'), +-- +1.8.4 + diff --git a/debian/patches/series b/debian/patches/series index 77985a2..0fb0b12 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ local_settings.patch settings_debian.patch remove_thirdparty_modules.patch remove_internal_logrotate.patch +django1.6_compatibility.patch