diff -Nru django-celery-3.1.17/debian/changelog django-celery-3.1.17/debian/changelog --- django-celery-3.1.17/debian/changelog 2015-10-25 23:07:57.000000000 +0000 +++ django-celery-3.1.17/debian/changelog 2016-01-09 07:33:29.000000000 +0000 @@ -1,3 +1,9 @@ +django-celery (3.1.17-3) unstable; urgency=medium + + * Apply patches for Django 1.9 compatibility. Closes: #809568. + + -- Brian May Sat, 09 Jan 2016 18:24:58 +1100 + django-celery (3.1.17-2) unstable; urgency=medium * Fix debian/watch file. diff -Nru django-celery-3.1.17/debian/.git-dpm django-celery-3.1.17/debian/.git-dpm --- django-celery-3.1.17/debian/.git-dpm 2015-10-25 22:08:12.000000000 +0000 +++ django-celery-3.1.17/debian/.git-dpm 2016-01-09 07:24:26.000000000 +0000 @@ -1,6 +1,6 @@ # see git-dpm(1) from git-dpm package -82fc0be53a36aebd4ca981f7e6bf2d63b1c5be2a -82fc0be53a36aebd4ca981f7e6bf2d63b1c5be2a +b1488a7aaa79825d44219d52c104011bc100d81f +b1488a7aaa79825d44219d52c104011bc100d81f 58751dd4216a267ccad1f8b5932487c51af036e4 58751dd4216a267ccad1f8b5932487c51af036e4 django-celery_3.1.17.orig.tar.gz diff -Nru django-celery-3.1.17/debian/patches/0006-Fix-caching-with-Django-1.9.patch django-celery-3.1.17/debian/patches/0006-Fix-caching-with-Django-1.9.patch --- django-celery-3.1.17/debian/patches/0006-Fix-caching-with-Django-1.9.patch 1970-01-01 00:00:00.000000000 +0000 +++ django-celery-3.1.17/debian/patches/0006-Fix-caching-with-Django-1.9.patch 2016-01-09 07:24:26.000000000 +0000 @@ -0,0 +1,52 @@ +From 7b213f6dde4c84c481dfcba9140b46d3e6d07a0d Mon Sep 17 00:00:00 2001 +From: Brian May +Date: Sat, 9 Jan 2016 18:17:18 +1100 +Subject: Fix caching with Django 1.9 + +Somewhat ugly because we can't lookup a cache by it's backend anymore, +however changing this would require potentially break compatability with +existing applications. +--- + djcelery/backends/cache.py | 4 ++-- + tests/settings.py | 9 +++++++++ + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/djcelery/backends/cache.py b/djcelery/backends/cache.py +index 40588bb..def97fd 100644 +--- a/djcelery/backends/cache.py ++++ b/djcelery/backends/cache.py +@@ -5,7 +5,7 @@ from datetime import timedelta + + import django + from django.utils.encoding import smart_str +-from django.core.cache import cache, get_cache ++from django.core.cache import cache, caches + + from celery import current_app + from celery.utils.timeutils import timedelta_seconds +@@ -13,7 +13,7 @@ from celery.backends.base import KeyValueStoreBackend + + # CELERY_CACHE_BACKEND overrides the django-global(tm) backend settings. + if current_app.conf.CELERY_CACHE_BACKEND: +- cache = get_cache(current_app.conf.CELERY_CACHE_BACKEND) # noqa ++ cache = caches[current_app.conf.CELERY_CACHE_BACKEND] # noqa + + + class DjangoMemcacheWrapper(object): +diff --git a/tests/settings.py b/tests/settings.py +index 9a52cb7..40123b9 100644 +--- a/tests/settings.py ++++ b/tests/settings.py +@@ -85,3 +85,12 @@ CELERY_SEND_TASK_ERROR_EMAILS = False + + USE_TZ = True + TIME_ZONE = 'UTC' ++ ++CACHES = { ++ 'default': { ++ 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', ++ }, ++ 'django.core.cache.backends.dummy.DummyCache': { ++ 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', ++ } ++} diff -Nru django-celery-3.1.17/debian/patches/0007-Fix-get_model-with-Django-1.9.patch django-celery-3.1.17/debian/patches/0007-Fix-get_model-with-Django-1.9.patch --- django-celery-3.1.17/debian/patches/0007-Fix-get_model-with-Django-1.9.patch 1970-01-01 00:00:00.000000000 +0000 +++ django-celery-3.1.17/debian/patches/0007-Fix-get_model-with-Django-1.9.patch 2016-01-09 07:24:26.000000000 +0000 @@ -0,0 +1,29 @@ +From b1488a7aaa79825d44219d52c104011bc100d81f Mon Sep 17 00:00:00 2001 +From: Brian May +Date: Sat, 9 Jan 2016 18:21:35 +1100 +Subject: Fix get_model with Django 1.9 + +--- + tests/someapp/tasks.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/someapp/tasks.py b/tests/someapp/tasks.py +index ed480b4..1c519dd 100644 +--- a/tests/someapp/tasks.py ++++ b/tests/someapp/tasks.py +@@ -1,6 +1,6 @@ + from celery.task import task + +-from django.db.models import get_model ++from django.apps import apps + + + @task(name='c.unittest.SomeAppTask') +@@ -10,6 +10,6 @@ def SomeAppTask(**kwargs): + + @task(name='c.unittest.SomeModelTask') + def SomeModelTask(pk): +- model = get_model('someapp', 'Thing') ++ model = apps.get_model('someapp', 'Thing') + thing = model.objects.get(pk=pk) + return thing.name diff -Nru django-celery-3.1.17/debian/patches/series django-celery-3.1.17/debian/patches/series --- django-celery-3.1.17/debian/patches/series 2015-10-25 22:08:12.000000000 +0000 +++ django-celery-3.1.17/debian/patches/series 2016-01-09 07:24:26.000000000 +0000 @@ -3,3 +3,5 @@ fix_autodiscover.patch privacy.patch 0005-Fix-python3-issues.patch +0006-Fix-caching-with-Django-1.9.patch +0007-Fix-get_model-with-Django-1.9.patch