[Python-modules-commits] r30729 - in packages/django-celery/trunk/debian (4 files)

bam at users.alioth.debian.org bam at users.alioth.debian.org
Tue Sep 23 05:43:38 UTC 2014


    Date: Tuesday, September 23, 2014 @ 05:43:37
  Author: bam
Revision: 30729

New upstream version.

Also fix another Django 1.7 issue.

Added:
  packages/django-celery/trunk/debian/patches/fix_autodiscover.patch
Modified:
  packages/django-celery/trunk/debian/changelog
  packages/django-celery/trunk/debian/patches/series
Deleted:
  packages/django-celery/trunk/debian/patches/remove_validate.patch

Modified: packages/django-celery/trunk/debian/changelog
===================================================================
--- packages/django-celery/trunk/debian/changelog	2014-09-23 03:01:43 UTC (rev 30728)
+++ packages/django-celery/trunk/debian/changelog	2014-09-23 05:43:37 UTC (rev 30729)
@@ -1,3 +1,10 @@
+django-celery (3.1.16-1) UNRELEASED; urgency=low
+
+  * New upstream version.
+  * Fix autodiscover issue with Django 1.7.
+
+ -- Brian May <bam at debian.org>  Tue, 23 Sep 2014 15:15:28 +1000
+
 django-celery (3.1.10-2) unstable; urgency=medium
 
   * Python3 package.

Added: packages/django-celery/trunk/debian/patches/fix_autodiscover.patch
===================================================================
--- packages/django-celery/trunk/debian/patches/fix_autodiscover.patch	                        (rev 0)
+++ packages/django-celery/trunk/debian/patches/fix_autodiscover.patch	2014-09-23 05:43:37 UTC (rev 30729)
@@ -0,0 +1,59 @@
+Index: django-celery/djcelery/loaders.py
+===================================================================
+--- django-celery.orig/djcelery/loaders.py	2014-04-01 01:40:49.000000000 +1100
++++ django-celery/djcelery/loaders.py	2014-09-23 15:15:08.103390537 +1000
+@@ -175,8 +175,13 @@
+         return
+     _RACE_PROTECTION = True
+     try:
+-        return filter(None, [find_related_module(app, 'tasks')
+-                             for app in settings.INSTALLED_APPS])
++        if django.VERSION < (1, 7):
++            return filter(None, [find_related_module(app, 'tasks')
++                                 for app in settings.INSTALLED_APPS])
++        else:
++            from django.apps import apps
++            return filter(None, [find_related_module(app.name, 'tasks')
++                                 for app in apps.get_app_configs()])
+     finally:
+         _RACE_PROTECTION = False
+ 
+Index: django-celery/djcelery/tests/test_discovery.py
+===================================================================
+--- django-celery.orig/djcelery/tests/test_discovery.py	2014-02-12 05:13:33.000000000 +1100
++++ django-celery/djcelery/tests/test_discovery.py	2014-09-23 15:36:00.821526454 +1000
+@@ -2,6 +2,7 @@
+ 
+ import warnings
+ 
++import django
+ from django.conf import settings
+ 
+ from celery.registry import tasks
+@@ -25,11 +26,20 @@
+     def test_discovery_with_broken(self):
+         warnings.resetwarnings()
+         if 'someapp' in settings.INSTALLED_APPS:
+-            installed_apps = list(settings.INSTALLED_APPS)
+-            settings.INSTALLED_APPS = installed_apps + ['xxxnot.aexist']
+-            try:
++            if django.VERSION < (1, 7):
++                # Django < 1.7
++                installed_apps = list(settings.INSTALLED_APPS)
++                settings.INSTALLED_APPS = installed_apps + ['xxxnot.aexist']
++                try:
++                    # we should get a warning when loading xxxnot.aexist
++                    with warnings.catch_warnings(record=True) as log:
++                        autodiscover()
++                        self.assertTrue(log)
++                finally:
++                    settings.INSTALLED_APPS = installed_apps
++            else:
++                # Django 1.7
+                 with warnings.catch_warnings(record=True) as log:
++                    # we should not get any warnings
+                     autodiscover()
+-                    self.assertTrue(log)
+-            finally:
+-                settings.INSTALLED_APPS = installed_apps
++                    self.assertEqual(log, [])

Deleted: packages/django-celery/trunk/debian/patches/remove_validate.patch
===================================================================
--- packages/django-celery/trunk/debian/patches/remove_validate.patch	2014-09-23 03:01:43 UTC (rev 30728)
+++ packages/django-celery/trunk/debian/patches/remove_validate.patch	2014-09-23 05:43:37 UTC (rev 30729)
@@ -1,20 +0,0 @@
-Index: django-celery/djcelery/management/commands/celery.py
-===================================================================
---- django-celery.orig/djcelery/management/commands/celery.py	2014-04-01 01:40:49.000000000 +1100
-+++ django-celery/djcelery/management/commands/celery.py	2014-08-13 13:09:17.266026523 +1000
-@@ -11,15 +11,12 @@
- class Command(CeleryCommand):
-     """The celery command."""
-     help = 'celery commands, see celery help'
--    requires_model_validation = True
-     options = (CeleryCommand.options
-                + base.get_options()
-                + base.preload_options)
- 
-     def run_from_argv(self, argv):
-         argv = self.handle_default_options(argv)
--        if self.requires_model_validation:
--            self.validate()
-         base.execute_from_commandline(
-             ['{0[0]} {0[1]}'.format(argv)] + argv[2:],
-         )

Modified: packages/django-celery/trunk/debian/patches/series
===================================================================
--- packages/django-celery/trunk/debian/patches/series	2014-09-23 03:01:43 UTC (rev 30728)
+++ packages/django-celery/trunk/debian/patches/series	2014-09-23 05:43:37 UTC (rev 30729)
@@ -1,3 +1,3 @@
-remove_validate.patch
 fix_dependencies.patch
 no-issues.patch
+fix_autodiscover.patch




More information about the Python-modules-commits mailing list