Browse Source

Remove copyright texts from modules

Ask Solem 12 years ago
parent
commit
cc1ae88ff9
100 changed files with 424 additions and 197 deletions
  1. 11 0
      celery/__compat__.py
  2. 4 2
      celery/__init__.py
  3. 0 3
      celery/app/__init__.py
  4. 9 0
      celery/app/abstract.py
  5. 1 4
      celery/app/amqp.py
  6. 12 0
      celery/app/annotations.py
  7. 1 4
      celery/app/base.py
  8. 8 0
      celery/app/builtins.py
  9. 0 5
      celery/app/control.py
  10. 0 3
      celery/app/defaults.py
  11. 12 0
      celery/app/log.py
  12. 0 3
      celery/app/registry.py
  13. 1 4
      celery/app/routes.py
  14. 1 4
      celery/app/task.py
  15. 8 0
      celery/app/utils.py
  16. 11 0
      celery/apps/beat.py
  17. 11 0
      celery/apps/worker.py
  18. 7 0
      celery/backends/__init__.py
  19. 9 0
      celery/backends/amqp.py
  20. 14 1
      celery/backends/base.py
  21. 7 0
      celery/backends/cache.py
  22. 7 1
      celery/backends/cassandra.py
  23. 7 0
      celery/backends/database/__init__.py
  24. 5 3
      celery/backends/database/dfd042c7.py
  25. 7 0
      celery/backends/database/models.py
  26. 7 0
      celery/backends/database/session.py
  27. 7 2
      celery/backends/mongodb.py
  28. 7 0
      celery/backends/redis.py
  29. 1 4
      celery/beat.py
  30. 7 0
      celery/bin/base.py
  31. 3 2
      celery/bin/camqadm.py
  32. 7 2
      celery/bin/celery.py
  33. 4 2
      celery/bin/celerybeat.py
  34. 8 0
      celery/bin/celeryctl.py
  35. 4 2
      celery/bin/celeryd.py
  36. 11 0
      celery/bin/celeryd_detach.py
  37. 2 0
      celery/bin/celeryd_multi.py
  38. 3 1
      celery/bin/celeryev.py
  39. 1 3
      celery/canvas.py
  40. 7 0
      celery/concurrency/__init__.py
  41. 7 0
      celery/concurrency/base.py
  42. 7 0
      celery/concurrency/eventlet.py
  43. 7 0
      celery/concurrency/gevent.py
  44. 10 0
      celery/concurrency/processes/__init__.py
  45. 7 0
      celery/concurrency/processes/_win.py
  46. 7 0
      celery/concurrency/solo.py
  47. 7 0
      celery/concurrency/threads.py
  48. 0 3
      celery/contrib/batches.py
  49. 8 0
      celery/contrib/bundles.py
  50. 1 0
      celery/contrib/methods.py
  51. 0 3
      celery/contrib/migrate.py
  52. 0 3
      celery/contrib/rdb.py
  53. 0 3
      celery/datastructures.py
  54. 1 4
      celery/events/__init__.py
  55. 0 3
      celery/events/cursesmon.py
  56. 0 3
      celery/events/dumper.py
  57. 0 3
      celery/events/snapshot.py
  58. 0 3
      celery/events/state.py
  59. 1 4
      celery/exceptions.py
  60. 0 3
      celery/loaders/__init__.py
  61. 0 3
      celery/loaders/app.py
  62. 0 3
      celery/loaders/base.py
  63. 0 3
      celery/loaders/default.py
  64. 0 3
      celery/local.py
  65. 0 3
      celery/platforms.py
  66. 0 3
      celery/result.py
  67. 0 3
      celery/schedules.py
  68. 8 0
      celery/security/__init__.py
  69. 8 0
      celery/security/certificate.py
  70. 8 0
      celery/security/key.py
  71. 8 0
      celery/security/serialization.py
  72. 8 0
      celery/security/utils.py
  73. 6 3
      celery/signals.py
  74. 10 0
      celery/state.py
  75. 1 4
      celery/task/__init__.py
  76. 2 4
      celery/task/base.py
  77. 1 4
      celery/task/http.py
  78. 8 0
      celery/task/sets.py
  79. 0 3
      celery/task/trace.py
  80. 0 3
      celery/utils/__init__.py
  81. 1 3
      celery/utils/compat.py
  82. 7 0
      celery/utils/debug.py
  83. 0 1
      celery/utils/dispatch/license.txt
  84. 2 13
      celery/utils/encoding.py
  85. 18 13
      celery/utils/functional.py
  86. 8 0
      celery/utils/imports.py
  87. 7 0
      celery/utils/log.py
  88. 0 3
      celery/utils/mail.py
  89. 0 3
      celery/utils/serialization.py
  90. 0 3
      celery/utils/term.py
  91. 8 0
      celery/utils/text.py
  92. 8 0
      celery/utils/threads.py
  93. 0 3
      celery/utils/timer2.py
  94. 1 4
      celery/utils/timeutils.py
  95. 0 3
      celery/worker/__init__.py
  96. 1 4
      celery/worker/abstract.py
  97. 0 3
      celery/worker/autoscale.py
  98. 0 3
      celery/worker/buckets.py
  99. 0 3
      celery/worker/consumer.py
  100. 0 3
      celery/worker/control.py

+ 11 - 0
celery/__compat__.py

@@ -1,3 +1,14 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.__compat__
+    ~~~~~~~~~~~~~~~~~
+
+    This module contains utilities to dynamically
+    recreate modules, either for lazy loading or
+    to create old modules at runtime instead of
+    having them litter the source tree.
+
+"""
 from __future__ import absolute_import
 
 import operator

+ 4 - 2
celery/__init__.py

@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 """Distributed Task Queue"""
-# :copyright: (c) 2009 - 2012 by Ask Solem.
-# :license:   BSD, see LICENSE for more details.
+# :copyright: (c) 2009 - 2012 Ask Solem and individual contributors,
+#                 All rights reserved.
+# :copyright: (c) 2012 VMware, Inc., All rights reserved.
+# :license:   BSD (3 Clause), see LICENSE for more details.
 
 from __future__ import absolute_import
 

+ 0 - 3
celery/app/__init__.py

@@ -5,9 +5,6 @@
 
     Celery Application.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 9 - 0
celery/app/abstract.py

@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.app.abstract
+    ~~~~~~~~~~~~~~~~~~~
+
+    Abstract class that takes default attribute values
+    from the configuration.
+
+"""
 from __future__ import absolute_import
 
 

+ 1 - 4
celery/app/amqp.py

@@ -3,10 +3,7 @@
     celery.app.amqp
     ~~~~~~~~~~~~~~~
 
-    AMQ related functionality.
-
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
+    Sending and receiving messages using Kombu.
 
 """
 from __future__ import absolute_import

+ 12 - 0
celery/app/annotations.py

@@ -1,3 +1,15 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.app.annotations
+    ~~~~~~~~~~~~~~~~~~~~~~
+
+    Annotations is a nice term for moneky patching
+    task classes in the configuration.
+
+    This prepares and performs the annotations in the
+    :setting:`CELERY_ANNOTATIONS` setting.
+
+"""
 from __future__ import absolute_import
 
 from celery.utils.functional import firstmethod, mpromise

+ 1 - 4
celery/app/base.py

@@ -3,10 +3,7 @@
     celery.app.base
     ~~~~~~~~~~~~~~~
 
-    Application Base Class.
-
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
+    Actual App instance implementation.
 
 """
 from __future__ import absolute_import

+ 8 - 0
celery/app/builtins.py

@@ -1,4 +1,12 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.app.builtins
+    ~~~~~~~~~~~~~~~~~~~
+
+    Built-in tasks that are always available in all
+    app instances. E.g. chord, group and xmap.
+
+"""
 from __future__ import absolute_import
 from __future__ import with_statement
 

+ 0 - 5
celery/app/control.py

@@ -6,9 +6,6 @@
     Client for worker remote control commands.
     Server implementation is in :mod:`celery.worker.control`.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 from __future__ import with_statement
@@ -252,8 +249,6 @@ class Control(object):
 
         """
         with self.app.default_connection(connection) as conn:
-            if channel is None:
-                channel = conn.default_channel
             arguments = dict(arguments or {}, **extra_kwargs)
             return self.mailbox(conn)._broadcast(command, arguments,
                                                  destination, reply, timeout,

+ 0 - 3
celery/app/defaults.py

@@ -5,9 +5,6 @@
 
     Configuration introspection and defaults.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 12 - 0
celery/app/log.py

@@ -1,3 +1,15 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.app.log
+    ~~~~~~~~~~~~~~
+
+    The Celery instances logging section: ``Celery.log``.
+
+    Sets up logging for the worker and other programs,
+    redirects stdouts, colors log output, patches logging
+    related compatibility fixes, and so on.
+
+"""
 from __future__ import absolute_import
 
 import logging

+ 0 - 3
celery/app/registry.py

@@ -5,9 +5,6 @@
 
     Registry of available tasks.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 1 - 4
celery/app/routes.py

@@ -3,12 +3,9 @@
     celery.routes
     ~~~~~~~~~~~~~
 
-    Contains utilities for working with task routes
+    Contains utilities for working with task routers,
     (:setting:`CELERY_ROUTES`).
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 1 - 4
celery/app/task.py

@@ -3,10 +3,7 @@
     celery.app.task
     ~~~~~~~~~~~~~~~
 
-    Tasks Implementation.
-
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
+    Task Implementation: Task request context, and the base task class.
 
 """
 from __future__ import absolute_import

+ 8 - 0
celery/app/utils.py

@@ -1,3 +1,11 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.app.utils
+    ~~~~~~~~~~~~~~~~
+
+    App utilities: Compat settings, bugreport tool, pickling apps.
+
+"""
 from __future__ import absolute_import
 
 import os

+ 11 - 0
celery/apps/beat.py

@@ -1,4 +1,15 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.apps.beat
+    ~~~~~~~~~~~~~~~~
+
+    This module is the "program-version" of :mod:`celery.beat`.
+
+    It does everything necessary to run that module
+    as an actual application, like installing signal handlers
+    and so on.
+
+"""
 from __future__ import absolute_import
 
 import socket

+ 11 - 0
celery/apps/worker.py

@@ -1,4 +1,15 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.apps.worker
+    ~~~~~~~~~~~~~~~~~~
+
+    This module is the "program-version" of :mod:`celery.worker`.
+
+    It does everything necessary to run that module
+    as an actual application, like installing signal handlers,
+    platform tweaks, and so on.
+
+"""
 from __future__ import absolute_import
 
 import logging

+ 7 - 0
celery/backends/__init__.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.backends
+    ~~~~~~~~~~~~~~~
+
+    Backend abstract factory (...did I just say that?) and alias definitions.
+
+"""
 from __future__ import absolute_import
 
 import sys

+ 9 - 0
celery/backends/amqp.py

@@ -1,4 +1,13 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.backends.amqp
+    ~~~~~~~~~~~~~~~~~~~~
+
+    The AMQP result backend.
+
+    This backend publishes results as messages.
+
+"""
 from __future__ import absolute_import
 from __future__ import with_statement
 

+ 14 - 1
celery/backends/base.py

@@ -1,5 +1,18 @@
 # -*- coding: utf-8 -*-
-"""celery.backends.base"""
+"""
+    celery.backends.base
+    ~~~~~~~~~~~~~~~~~~~~
+
+    Result backend base classes.
+
+    - :class:`BaseBackend` defines the interface.
+
+    - :class:`BaseDictBackend` assumes the fields are stored in a dict.
+
+    - :class:`KeyValueStoreBackend` is a common base class
+      using K/V semantics like _get and _put.
+
+"""
 from __future__ import absolute_import
 
 import time

+ 7 - 0
celery/backends/cache.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.backends.cache
+    ~~~~~~~~~~~~~~~~~~~~~
+
+    Memcache and in-memory cache result backend.
+
+"""
 from __future__ import absolute_import
 
 from celery.datastructures import LRUCache

+ 7 - 1
celery/backends/cassandra.py

@@ -1,5 +1,11 @@
 # -*- coding: utf-8 -*-
-"""celery.backends.cassandra"""
+"""
+    celery.backends.cassandra
+    ~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Apache Cassandra result store backend.
+
+"""
 from __future__ import absolute_import
 
 try:  # pragma: no cover

+ 7 - 0
celery/backends/database/__init__.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.backends.database
+    ~~~~~~~~~~~~~~~~~~~~~~~~
+
+    SQLAlchemy result store backend.
+
+"""
 from __future__ import absolute_import
 
 from functools import wraps

+ 5 - 3
celery/backends/database/dfd042c7.py

@@ -1,9 +1,11 @@
 # -*- coding: utf-8 -*-
 """
-dfd042c7
+    celery.backends.database.dfd042c7
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-SQLAlchemy 0.5.8 version of a805d4bd, see the docstring of that module
-for an explanation of this workaround.
+    SQLAlchemy 0.5.8 version of :mod:`~celery.backends.database.a805d4bd`,
+    see the docstring of that module for an explanation of why we need
+    this workaround.
 
 """
 from __future__ import absolute_import

+ 7 - 0
celery/backends/database/models.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.backends.database.models
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Database tables for the SQLAlchemy result store backend.
+
+"""
 from __future__ import absolute_import
 
 from datetime import datetime

+ 7 - 0
celery/backends/database/session.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.backends.database.session
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    SQLAlchemy sessions.
+
+"""
 from __future__ import absolute_import
 
 from collections import defaultdict

+ 7 - 2
celery/backends/mongodb.py

@@ -1,6 +1,11 @@
-
 # -*- coding: utf-8 -*-
-"""MongoDB backend for celery."""
+"""
+    celery.backends.mongodb
+    ~~~~~~~~~~~~~~~~~~~~~~~
+
+    MongoDB result store backend.
+
+"""
 from __future__ import absolute_import
 
 from datetime import datetime

+ 7 - 0
celery/backends/redis.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.backends.redis
+    ~~~~~~~~~~~~~~~~~~~~~
+
+    Redis result store backend.
+
+"""
 from __future__ import absolute_import
 
 from kombu.utils.url import _parse_url

+ 1 - 4
celery/beat.py

@@ -3,10 +3,7 @@
     celery.beat
     ~~~~~~~~~~~
 
-    The Celery periodic task scheduler.
-
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
+    The periodic task scheduler.
 
 """
 from __future__ import absolute_import

+ 7 - 0
celery/bin/base.py

@@ -1,5 +1,12 @@
 # -*- coding: utf-8 -*-
 """
+    celery.bin.base
+    ~~~~~~~~~~~~~~~
+
+    Base class for command line programs.
+
+    Implements tools for command line arguments parsing,
+    and more.
 
 .. _preload-options:
 

+ 3 - 2
celery/bin/camqadm.py

@@ -1,7 +1,8 @@
 # -*- coding: utf-8 -*-
-"""camqadm
+"""
+The :program:`celery amqp` command.
 
-.. program:: camqadm
+.. program:: celery amqp
 
 """
 from __future__ import absolute_import

+ 7 - 2
celery/bin/celery.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+
+The :program:`celery` umbrella command.
+
+.. program:: celery
+
+"""
 from __future__ import absolute_import
 from __future__ import with_statement
 
@@ -862,8 +869,6 @@ class CeleryCommand(BaseCommand):
         return "\n".join(ret).strip()
 
 
-
-
 def determine_exit_status(ret):
     if isinstance(ret, int):
         return ret

+ 4 - 2
celery/bin/celerybeat.py

@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
-"""celerybeat
+"""
+
+The :program:`celery beat` command.
 
-.. program:: celerybeat
+.. program:: celery beat
 
 .. seealso::
 

+ 8 - 0
celery/bin/celeryctl.py

@@ -1,3 +1,11 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.bin.celeryctl
+    ~~~~~~~~~~~~~~~~~~~~
+
+    Now replaced by the :program:`celery` command.
+
+"""
 from __future__ import absolute_import
 
 from celery.bin.celery import (  # noqa

+ 4 - 2
celery/bin/celeryd.py

@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
-"""celeryd
+"""
+
+The :program:`celery worker` command (previously known as ``celeryd``).
 
-.. program:: celeryd
+.. program:: celery worker
 
 .. seealso::
 

+ 11 - 0
celery/bin/celeryd_detach.py

@@ -1,4 +1,15 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.bin.celeryd_detach
+    ~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Program used to daemonize celeryd.
+
+    Using :func:`os.execv` because forking and multiprocessing
+    leads to weird issues (it was a long time ago now, but it
+    could have something to do with the threading mutex bug)
+
+"""
 from __future__ import absolute_import
 from __future__ import with_statement
 

+ 2 - 0
celery/bin/celeryd_multi.py

@@ -1,6 +1,8 @@
 # -*- coding: utf-8 -*-
 """
 
+.. program:: celeryd-multi
+
 Examples
 ========
 

+ 3 - 1
celery/bin/celeryev.py

@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 """
 
-.. program:: celeryev
+The :program:`celery events` command.
+
+.. program:: celery events
 
 .. seealso::
 

+ 1 - 3
celery/canvas.py

@@ -1,12 +1,10 @@
+# -*- coding: utf-8 -*-
 """
     celery.canvas
     ~~~~~~~~~~~~~
 
     Designing task workflows.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 7 - 0
celery/concurrency/__init__.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.concurrency
+    ~~~~~~~~~~~~~~~~~~
+
+    Pool implementation abstract factory, and alias definitions.
+
+"""
 from __future__ import absolute_import
 
 from celery.utils.imports import symbol_by_name

+ 7 - 0
celery/concurrency/base.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.concurrency.base
+    ~~~~~~~~~~~~~~~~~~~~~~~
+
+    TaskPool interface.
+
+"""
 from __future__ import absolute_import
 
 import logging

+ 7 - 0
celery/concurrency/eventlet.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.concurrency.eventlet
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Eventlet pool implementation.
+
+"""
 from __future__ import absolute_import
 
 import os

+ 7 - 0
celery/concurrency/gevent.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.concurrency.gevent
+    ~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    gevent pool implementation.
+
+"""
 from __future__ import absolute_import
 
 import os

+ 10 - 0
celery/concurrency/processes/__init__.py

@@ -1,4 +1,14 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.concurrency.processes
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Pool implementation using :mod:`multiprocessing`.
+
+    We use the billiard fork of multiprocessing which contains
+    numerous improvements.
+
+"""
 from __future__ import absolute_import
 
 import os

+ 7 - 0
celery/concurrency/processes/_win.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.concurrency.processes._win
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Windows utilities to terminate process groups.
+
+"""
 from __future__ import absolute_import
 
 import os

+ 7 - 0
celery/concurrency/solo.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.concurrency.solo
+    ~~~~~~~~~~~~~~~~~~~~~~~
+
+    Single-threaded pool implementation.
+
+"""
 from __future__ import absolute_import
 
 import os

+ 7 - 0
celery/concurrency/threads.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.concurrency.threads
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Pool implementation using threads.
+
+"""
 from __future__ import absolute_import
 
 from celery.utils.compat import UserDict

+ 0 - 3
celery/contrib/batches.py

@@ -36,9 +36,6 @@ Registering the click is done as follows:
     In the future we hope to add the ability to direct batching tasks
     to a channel with different QoS requirements than the task channel.
 
-:copyright: (c) 2009 - 2012 by Ask Solem.
-:license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 8 - 0
celery/contrib/bundles.py

@@ -1,3 +1,11 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.contrib.bundles
+    ~~~~~~~~~~~~~~~~~~~~~~
+
+    Celery PyPI Bundles.
+
+"""
 from __future__ import absolute_import
 
 from celery import VERSION

+ 1 - 0
celery/contrib/methods.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """
 celery.contrib.methods
 ======================

+ 0 - 3
celery/contrib/migrate.py

@@ -5,9 +5,6 @@
 
     Migration tools.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 from __future__ import with_statement

+ 0 - 3
celery/contrib/rdb.py

@@ -33,9 +33,6 @@ Inspired by http://snippets.dzone.com/posts/show/7248
     The debugger will try to find an available port starting from the
     base port.  The selected port will be logged by the worker.
 
-:copyright: (c) 2009 - 2012 by Ask Solem.
-:license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 0 - 3
celery/datastructures.py

@@ -5,9 +5,6 @@
 
     Custom types and data structures.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 from __future__ import with_statement

+ 1 - 4
celery/events/__init__.py

@@ -3,13 +3,10 @@
     celery.events
     ~~~~~~~~~~~~~
 
-    Events are messages sent for actions happening
+    Events is a stream of messages sent for certain actions occurring
     in the worker (and clients if :setting:`CELERY_SEND_TASK_SENT_EVENT`
     is enabled), used for monitoring purposes.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 from __future__ import with_statement

+ 0 - 3
celery/events/cursesmon.py

@@ -5,9 +5,6 @@
 
     Graphical monitor of Celery events using curses.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 from __future__ import with_statement

+ 0 - 3
celery/events/dumper.py

@@ -6,9 +6,6 @@
     THis is a simple program that dumps events to the console
     as they happen.  Think of it like a `tcpdump` for Celery events.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 0 - 3
celery/events/snapshot.py

@@ -9,9 +9,6 @@
     implementation of this writing the snapshots to a database
     in :mod:`djcelery.snapshots` in the `django-celery` distribution.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 0 - 3
celery/events/state.py

@@ -15,9 +15,6 @@
     take "pictures" of this state at regular intervals
     to e.g. store that in a database.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 from __future__ import with_statement

+ 1 - 4
celery/exceptions.py

@@ -3,10 +3,7 @@
     celery.exceptions
     ~~~~~~~~~~~~~~~~~
 
-    This module contains Celery-specific exceptions.
-
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
+    This module contains all exceptions used by the Celery API.
 
 """
 from __future__ import absolute_import

+ 0 - 3
celery/loaders/__init__.py

@@ -6,9 +6,6 @@
     Loaders define how configuration is read, what happens
     when workers start, when tasks are executed and so on.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 0 - 3
celery/loaders/app.py

@@ -5,9 +5,6 @@
 
     The default loader used with custom app instances.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 0 - 3
celery/loaders/base.py

@@ -5,9 +5,6 @@
 
     Loader base class.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 0 - 3
celery/loaders/default.py

@@ -5,9 +5,6 @@
 
     The default loader used when no custom app has been initialized.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 0 - 3
celery/local.py

@@ -9,9 +9,6 @@
 
     Parts of this module is Copyright by Werkzeug Team.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 0 - 3
celery/platforms.py

@@ -6,9 +6,6 @@
     Utilities dealing with platform specifics: signals, daemonization,
     users, groups, and so on.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 from __future__ import with_statement

+ 0 - 3
celery/result.py

@@ -5,9 +5,6 @@
 
     Task results/state and groups of results.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 from __future__ import with_statement

+ 0 - 3
celery/schedules.py

@@ -6,9 +6,6 @@
     Schedules define the intervals at which periodic tasks
     should run.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 8 - 0
celery/security/__init__.py

@@ -1,3 +1,11 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.security
+    ~~~~~~~~~~~~~~~
+
+    Module implementing the signing message serializer.
+
+"""
 from __future__ import absolute_import
 from __future__ import with_statement
 

+ 8 - 0
celery/security/certificate.py

@@ -1,3 +1,11 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.security.certificate
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    X.509 certificates.
+
+"""
 from __future__ import absolute_import
 from __future__ import with_statement
 

+ 8 - 0
celery/security/key.py

@@ -1,3 +1,11 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.security.key
+    ~~~~~~~~~~~~~~~~~~~
+
+    Private key for the security serializer.
+
+"""
 from __future__ import absolute_import
 from __future__ import with_statement
 

+ 8 - 0
celery/security/serialization.py

@@ -1,3 +1,11 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.security.serialization
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Secure serializer.
+
+"""
 from __future__ import absolute_import
 from __future__ import with_statement
 

+ 8 - 0
celery/security/utils.py

@@ -1,3 +1,11 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.security.utils
+    ~~~~~~~~~~~~~~~~~~~~~
+
+    Utilities used by the message signing serializer.
+
+"""
 from __future__ import absolute_import
 
 import sys

+ 6 - 3
celery/signals.py

@@ -3,10 +3,13 @@
     celery.signals
     ~~~~~~~~~~~~~~
 
-    See :ref:`signals`.
+    This module defines the signals (Observer pattern) sent by
+    both workers and clients.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
+    Functions can be connected to these signals, and connected
+    functions are called whenever a signal is called.
+
+    See :ref:`signals` for more information.
 
 """
 from __future__ import absolute_import

+ 10 - 0
celery/state.py

@@ -1,3 +1,13 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.state
+    ~~~~~~~~~~~~~~~
+
+    This is an internal module containing thread state
+    like the current_app, and current_task.  But these
+    should not be imported from here.
+
+"""
 from __future__ import absolute_import
 
 import threading

+ 1 - 4
celery/task/__init__.py

@@ -3,10 +3,7 @@
     celery.task
     ~~~~~~~~~~~
 
-    Creating tasks, subtasks, sets and chords.
-
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
+    This is the old task module, it should not be used anymore.
 
 """
 from __future__ import absolute_import

+ 2 - 4
celery/task/base.py

@@ -5,10 +5,8 @@
 
     The task implementation has been moved to :mod:`celery.app.task`.
 
-    This contains the backward compatible Task class used in the old API.
-
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
+    This contains the backward compatible Task class used in the old API,
+    and shouldn't be used anymore.
 
 """
 from __future__ import absolute_import

+ 1 - 4
celery/task/http.py

@@ -3,10 +3,7 @@
     celery.task.http
     ~~~~~~~~~~~~~~~~
 
-    Task webhooks implementation.
-
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
+    Webhook task implementation.
 
 """
 from __future__ import absolute_import

+ 8 - 0
celery/task/sets.py

@@ -1,4 +1,12 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.task.sets
+    ~~~~~~~~~~~~~~~~
+
+    Old ``group`` implementation, this module should
+    not be used anymore use :func:`celery.group` instead.
+
+"""
 from __future__ import absolute_import
 from __future__ import with_statement
 

+ 0 - 3
celery/task/trace.py

@@ -6,9 +6,6 @@
     This module defines how the task execution is traced:
     errors are recorded, handlers are applied and so on.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 0 - 3
celery/utils/__init__.py

@@ -5,9 +5,6 @@
 
     Utility functions.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 from __future__ import with_statement

+ 1 - 3
celery/utils/compat.py

@@ -3,11 +3,9 @@
     celery.utils.compat
     ~~~~~~~~~~~~~~~~~~~
 
-    Backward compatible implementations of features
+    Compatibility implementations of features
     only available in newer Python versions.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import

+ 7 - 0
celery/utils/debug.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.utils.debug
+    ~~~~~~~~~~~~~~~~~~
+
+    Utilities for debugging memory usage.
+
+"""
 from __future__ import absolute_import
 
 import os

+ 0 - 1
celery/utils/dispatch/license.txt

@@ -33,4 +33,3 @@ PyDispatcher License:
     STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
     OF THE POSSIBILITY OF SUCH DAMAGE.
-

+ 2 - 13
celery/utils/encoding.py

@@ -5,21 +5,10 @@
 
     This module has moved to :mod:`kombu.utils.encoding`.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 
 from kombu.utils.encoding import (  # noqa
-        default_encode,
-        default_encoding,
-        bytes_t,
-        bytes_to_str,
-        str_t,
-        str_to_bytes,
-        ensure_bytes,
-        from_utf8,
-        safe_str,
-        safe_repr,
+        default_encode, default_encoding, bytes_t, bytes_to_str, str_t,
+        str_to_bytes, ensure_bytes, from_utf8, safe_str, safe_repr,
 )

+ 18 - 13
celery/utils/functional.py

@@ -5,9 +5,6 @@
 
     Utilities for functions.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 from __future__ import with_statement
@@ -93,10 +90,12 @@ class LRUCache(UserDict):
 
 
 def is_list(l):
+    """Returns true if object is list-like, but not a dict or string."""
     return hasattr(l, "__iter__") and not isinstance(l, (dict, basestring))
 
 
 def maybe_list(l):
+    """Returns list of one element if ``l`` is a scalar."""
     return l if l is None or is_list(l) else [l]
 
 
@@ -239,12 +238,24 @@ def mattrgetter(*attrs):
                                 for attr in attrs)
 
 
+def _add(s, x):
+    print("ADD %r" % (x, ))
+    s.add(x)
+
+
 def uniq(it):
+    """Returns all unique elements in ``it``, preserving order."""
     seen = set()
-    for obj in it:
-        if obj not in seen:
-            yield obj
-            seen.add(obj)
+    return (seen.add(obj) or obj for obj in it if obj not in seen)
+
+
+def regen(it):
+    """Regen takes any iterable, and if the object is an
+    generator it will cache the evaluated list on first access,
+    so that the generator can be "consumed" multiple times."""
+    if isinstance(it, (list, tuple)):
+        return it
+    return _regen(it)
 
 
 class _regen(UserList, list):
@@ -258,9 +269,3 @@ class _regen(UserList, list):
 
     def __iter__(self):  # needed for Python 2.5
         return iter(self.data)
-
-
-def regen(it):
-    if isinstance(it, (list, tuple)):
-        return it
-    return _regen(it)

+ 8 - 0
celery/utils/imports.py

@@ -1,3 +1,11 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.utils.import
+    ~~~~~~~~~~~~~~~~~~~
+
+    Utilities related to importing modules and symbols by name.
+
+"""
 from __future__ import absolute_import
 from __future__ import with_statement
 

+ 7 - 0
celery/utils/log.py

@@ -1,4 +1,11 @@
 # -*- coding: utf-8 -*-
+"""
+    celery.utils.log
+    ~~~~~~~~~~~~~~~~
+
+    Logging utilities.
+
+"""
 from __future__ import absolute_import
 
 import logging

+ 0 - 3
celery/utils/mail.py

@@ -5,9 +5,6 @@
 
     How task error emails are formatted and sent.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 0 - 3
celery/utils/serialization.py

@@ -5,9 +5,6 @@
 
     Utilities for safely pickling exceptions.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 0 - 3
celery/utils/term.py

@@ -5,9 +5,6 @@
 
     Terminals and colors.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 8 - 0
celery/utils/text.py

@@ -1,3 +1,11 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.utils.text
+    ~~~~~~~~~~~~~~~~~
+
+    Text formatting utilities
+
+"""
 from __future__ import absolute_import
 
 import textwrap

+ 8 - 0
celery/utils/threads.py

@@ -1,3 +1,11 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.utils.threads
+    ~~~~~~~~~~~~~~~~~~~~
+
+    Threading utilities.
+
+"""
 from __future__ import absolute_import
 
 import os

+ 0 - 3
celery/utils/timer2.py

@@ -5,9 +5,6 @@
 
     Scheduler for Python functions.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 from __future__ import with_statement

+ 1 - 4
celery/utils/timeutils.py

@@ -3,10 +3,7 @@
     celery.utils.timeutils
     ~~~~~~~~~~~~~~~~~~~~~~
 
-    This module contains various utilities relating to dates and times.
-
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
+    This module contains various utilities related to dates and times.
 
 """
 from __future__ import absolute_import

+ 0 - 3
celery/worker/__init__.py

@@ -8,9 +8,6 @@
     The worker consists of several components, all managed by boot-steps
     (mod:`celery.abstract`).
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

+ 1 - 4
celery/worker/abstract.py

@@ -3,10 +3,7 @@
     celery.worker.abstract
     ~~~~~~~~~~~~~~~~~~~~~~
 
-    Implements components and boot-steps.
-
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
+    The boot-step components.
 
 """
 from __future__ import absolute_import

+ 0 - 3
celery/worker/autoscale.py

@@ -10,9 +10,6 @@
     The autoscale thread is only enabled if autoscale
     has been enabled on the command line.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 from __future__ import with_statement

+ 0 - 3
celery/worker/buckets.py

@@ -11,9 +11,6 @@
     The :mod:`celery.worker.mediator` is then responsible
     for moving tasks from the ``ready_queue`` to the worker pool.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 from __future__ import with_statement

+ 0 - 3
celery/worker/consumer.py

@@ -7,9 +7,6 @@ This module contains the component responsible for consuming messages
 from the broker, processing the messages and keeping the broker connections
 up and running.
 
-:copyright: (c) 2009 - 2012 by Ask Solem.
-:license: BSD, see LICENSE for more details.
-
 
 * :meth:`~Consumer.start` is an infinite loop, which only iterates
   again if the connection is lost. For each iteration (at start, or if the

+ 0 - 3
celery/worker/control.py

@@ -5,9 +5,6 @@
 
     Remote control commands.
 
-    :copyright: (c) 2009 - 2012 by Ask Solem.
-    :license: BSD, see LICENSE for more details.
-
 """
 from __future__ import absolute_import
 

Some files were not shown because too many files changed in this diff