Browse Source

Change all references of Carrot to Kombu

Ask Solem 14 years ago
parent
commit
395f99e296

+ 1 - 1
celery/app/amqp.py

@@ -8,8 +8,8 @@ from celery import routes
 from celery import signals
 from celery.utils import gen_unique_id, mitemgetter, textindent
 
-from kombu.connection import BrokerConnection
 from kombu import compat as messaging
+from kombu import BrokerConnection
 
 MSG_OPTIONS = ("mandatory", "priority", "immediate",
                "routing_key", "serializer", "delivery_mode",

+ 1 - 1
celery/app/base.py

@@ -201,7 +201,7 @@ class BaseApp(object):
             ``BROKER_CONNECTION_TIMEOUT`` setting.
         :keyword backend_cls: defaults to the ``BROKER_BACKEND`` setting.
 
-        :returns :class:`carrot.connection.BrokerConnection`:
+        :returns :class:`kombu.connection.BrokerConnection`:
 
         """
         return self.amqp.BrokerConnection(

+ 1 - 1
celery/backends/cache.py

@@ -1,6 +1,6 @@
 from datetime import timedelta
 
-from carrot.utils import partition
+from kombu.utils import partition
 
 from celery.backends.base import KeyValueStoreBackend
 from celery.exceptions import ImproperlyConfigured

+ 1 - 1
celery/bin/camqadm.py

@@ -12,7 +12,7 @@ import pprint
 from itertools import count
 
 from amqplib import client_0_8 as amqp
-from carrot.utils import partition
+from kombu.utils import partition
 
 from celery.app import app_or_default
 from celery.bin.base import Command

+ 1 - 1
celery/events/__init__.py

@@ -5,7 +5,7 @@ import threading
 from collections import deque
 from itertools import count
 
-from carrot.messaging import Publisher, Consumer
+from kombu.compat import Publisher, Consumer
 
 from celery.app import app_or_default
 

+ 1 - 1
celery/events/state.py

@@ -3,7 +3,7 @@ import heapq
 
 from threading import Lock
 
-from carrot.utils import partition
+from kombu.utils import partition
 
 from celery import states
 from celery.datastructures import AttributeDict, LocalCache

+ 1 - 1
celery/messaging.py

@@ -28,7 +28,7 @@ def with_connection(fun):
 
 
 def get_consumer_set(connection, queues=None, **options):
-    """Get the :class:`carrot.messaging.ConsumerSet`` for a queue
+    """Get the :class:`kombu.messaging.Consumer`` for a queue
     configuration.
 
     Defaults to the queues in :const:`CELERY_QUEUES`.

+ 1 - 1
celery/task/base.py

@@ -459,7 +459,7 @@ class BaseTask(object):
             ``CELERY_TASK_SERIALIZER`` setting. Can be ``pickle``,
             ``json``, ``yaml``, or any custom serialization method
             that has been registered with
-            :mod:`carrot.serialization.registry`. Defaults to the tasks
+            :mod:`kombu.serialization.registry`.  Defaults to the tasks
             :attr:`serializer` attribute.
 
         :keyword compression: A string identifying the compression method

+ 1 - 1
contrib/requirements/default.txt

@@ -1,5 +1,5 @@
 python-dateutil
 sqlalchemy
 anyjson
-carrot>=0.10.7
+kombu
 pyparsing

+ 1 - 1
docs/configuration.rst

@@ -679,7 +679,7 @@ CELERY_TASK_SERIALIZER
 
 A string identifying the default serialization method to use.  Can be
 ``pickle`` (default), ``json``, ``yaml``, or any custom serialization
-methods that have been registered with :mod:`carrot.serialization.registry`.
+methods that have been registered with :mod:`kombu.serialization.registry`.
 
 .. seealso::
 

+ 4 - 2
docs/internals/worker.rst

@@ -34,10 +34,12 @@ The ETA schedule is a heap queue sorted by time.
 Components
 ==========
 
-CarrotListener
+Listener
 --------------
 
-Receives messages from the broker using ``carrot``.
+Receives messages from the broker using `Kombu`_.
+
+.. _`Kombu`: http://pypi.python.org/pypi/kombu
 
 When a message is received it's converted into a
 :class:`celery.worker.job.TaskRequest` object.

+ 1 - 1
docs/reference/celery.conf.rst

@@ -162,7 +162,7 @@ Execution
     A string identifying the default serialization
     method to use. Can be ``pickle`` (default),
     ``json``, ``yaml``, or any custom serialization methods that have
-    been registered with :mod:`carrot.serialization.registry`.
+    been registered with :mod:`kombu.serialization.registry`.
 
     Default is ``pickle``.
 

+ 5 - 5
docs/tutorials/clickcounter.rst

@@ -1,7 +1,7 @@
 .. _tut-clickcounter:
 
 ============================================================
- Tutorial: Creating a click counter using carrot and celery
+ Tutorial: Creating a click counter using Kombu and celery
 ============================================================
 
 .. contents::
@@ -18,10 +18,10 @@ you are likely to bump into problems. One database write for every click is
 not good if you have millions of clicks a day.
 
 So what can you do? In this tutorial we will send the individual clicks as
-messages using ``carrot``, and then process them later with a ``celery``
+messages using ``kombu``, and then process them later with a ``celery``
 periodic task.
 
-Celery and carrot is excellent in tandem, and while this might not be
+Celery and Kombu is excellent in tandem, and while this might not be
 the perfect example, you'll at least see one example how of they can be used
 to solve a task.
 
@@ -70,7 +70,7 @@ its count by.
             verbose_name = _(u"URL clicks")
             verbose_name_plural = _(u"URL clicks")
 
-Using carrot to send clicks as messages
+Using Kombu to send clicks as messages
 ========================================
 
 The model is normal django stuff, nothing new there. But now we get on to
@@ -111,7 +111,7 @@ On to the code...
 .. code-block:: python
 
     from celery.messaging import establish_connection
-    from carrot.messaging import Publisher, Consumer
+    from kombu.compat import Publisher, Consumer
     from clickmuncher.models import Click
 
 

+ 1 - 1
docs/tutorials/otherqueues.rst

@@ -26,7 +26,7 @@ For the Redis support you have to install the Python redis client::
 Configuration
 -------------
 
-Configuration is easy, set the carrot backend, and configure the location of
+Configuration is easy, set the transport, and configure the location of
 your Redis database::
 
     BROKER_BACKEND = "redis"

+ 3 - 3
docs/userguide/executing.rst

@@ -124,10 +124,10 @@ change this globally or for each individual task.
 There is built-in support for :mod:`pickle`, ``JSON``, ``YAML``
 and ``msgpack``, and you can also add your own custom serializers by registering
 them into the Carrot serializer registry (see
-`Carrot: Serialization of Data`_).
+`Kombu: Serialization of Data`_).
 
-.. _`Carrot: Serialization of Data`:
-    http://packages.python.org/carrot/introduction.html#serialization-of-data
+.. _`Kombu: Serialization of Data`:
+    http://packages.python.org/kombu/introduction.html#serialization-of-data
 
 Each option has its advantages and disadvantages.
 

+ 1 - 1
docs/userguide/tasks.rst

@@ -238,7 +238,7 @@ General
     method to use. Defaults to the :setting:`CELERY_TASK_SERIALIZER`
     setting.  Can be ``pickle`` ``json``, ``yaml``, or any custom
     serialization methods that have been registered with
-    :mod:`carrot.serialization.registry`.
+    :mod:`kombu.serialization.registry`.
 
     Please see :ref:`executing-serializers` for more information.
 

+ 1 - 1
setup.py

@@ -129,7 +129,7 @@ except ImportError:
 install_requires.extend([
     "python-dateutil",
     "anyjson",
-    "carrot>=0.10.7",
+    "kombu
     "pyparsing",
 ])