Browse Source

Renames celery.routes -> celery.app.routes

Ask Solem 13 years ago
parent
commit
4f4e673b4b
3 changed files with 8 additions and 7 deletions
  1. 2 1
      celery/app/amqp.py
  2. 5 5
      celery/app/routes.py
  3. 1 1
      celery/tests/test_app/test_routes.py

+ 2 - 1
celery/app/amqp.py

@@ -17,11 +17,12 @@ from kombu import BrokerConnection, Exchange
 from kombu import compat as messaging
 from kombu.pools import ProducerPool
 
-from .. import routes as _routes
 from .. import signals
 from ..utils import cached_property, lpmerge, uuid
 from ..utils import text
 
+from . import routes as _routes
+
 #: List of known options to a Kombu producers send method.
 #: Used to extract the message related options out of any `dict`.
 MSG_OPTIONS = ("mandatory", "priority", "immediate", "routing_key",

+ 5 - 5
celery/routes.py → celery/app/routes.py

@@ -12,10 +12,10 @@
 """
 from __future__ import absolute_import
 
-from .exceptions import QueueNotFound
-from .utils import lpmerge
-from .utils.functional import firstmethod, mpromise
-from .utils.imports import instantiate
+from ..exceptions import QueueNotFound
+from ..utils import lpmerge
+from ..utils.functional import firstmethod, mpromise
+from ..utils.imports import instantiate
 
 _first_route = firstmethod("route_for_task")
 
@@ -36,7 +36,7 @@ class Router(object):
 
     def __init__(self, routes=None, queues=None, create_missing=False,
             app=None):
-        from .app import app_or_default
+        from . import app_or_default
         self.app = app_or_default(app)
         self.queues = {} if queues is None else queues
         self.routes = [] if routes is None else routes

+ 1 - 1
celery/tests/test_app/test_routes.py

@@ -5,8 +5,8 @@ from functools import wraps
 
 from kombu.utils.functional import maybe_promise
 
-from celery import routes
 from celery import current_app
+from celery.app import routes
 from celery.exceptions import QueueNotFound
 from celery.task import task
 from celery.tests.utils import Case