Browse Source

__all__ is everywhere

Ask Solem 11 years ago
parent
commit
154b574809
100 changed files with 317 additions and 49 deletions
  1. 1 1
      celery/__init__.py
  2. 2 0
      celery/__main__.py
  3. 3 0
      celery/_state.py
  4. 6 2
      celery/app/__init__.py
  5. 2 0
      celery/app/amqp.py
  6. 5 3
      celery/app/annotations.py
  7. 2 0
      celery/app/base.py
  8. 2 0
      celery/app/builtins.py
  9. 2 0
      celery/app/control.py
  10. 2 1
      celery/app/defaults.py
  11. 2 0
      celery/app/log.py
  12. 2 0
      celery/app/registry.py
  13. 2 0
      celery/app/routes.py
  14. 2 0
      celery/app/task.py
  15. 3 0
      celery/app/trace.py
  16. 2 0
      celery/app/utils.py
  17. 2 0
      celery/apps/beat.py
  18. 2 0
      celery/apps/worker.py
  19. 2 0
      celery/backends/__init__.py
  20. 2 0
      celery/backends/amqp.py
  21. 2 0
      celery/backends/base.py
  22. 2 0
      celery/backends/cache.py
  23. 2 0
      celery/backends/cassandra.py
  24. 2 0
      celery/backends/couchbase.py
  25. 2 0
      celery/backends/database/__init__.py
  26. 2 0
      celery/backends/database/models.py
  27. 2 0
      celery/backends/database/session.py
  28. 2 0
      celery/backends/mongodb.py
  29. 2 0
      celery/backends/redis.py
  30. 2 0
      celery/backends/rpc.py
  31. 3 0
      celery/beat.py
  32. 3 1
      celery/bin/__init__.py
  33. 2 0
      celery/bin/amqp.py
  34. 3 0
      celery/bin/base.py
  35. 2 0
      celery/bin/beat.py
  36. 2 0
      celery/bin/celery.py
  37. 2 0
      celery/bin/celeryd_detach.py
  38. 2 0
      celery/bin/events.py
  39. 2 0
      celery/bin/graph.py
  40. 2 0
      celery/bin/multi.py
  41. 2 0
      celery/bin/worker.py
  42. 2 0
      celery/bootsteps.py
  43. 3 0
      celery/canvas.py
  44. 2 0
      celery/concurrency/__init__.py
  45. 2 0
      celery/concurrency/base.py
  46. 2 0
      celery/concurrency/eventlet.py
  47. 2 0
      celery/concurrency/gevent.py
  48. 2 0
      celery/concurrency/processes.py
  49. 2 0
      celery/concurrency/solo.py
  50. 2 0
      celery/concurrency/threads.py
  51. 2 0
      celery/contrib/abortable.py
  52. 2 0
      celery/contrib/batches.py
  53. 1 0
      celery/contrib/bundles.py
  54. 2 0
      celery/contrib/methods.py
  55. 4 0
      celery/contrib/migrate.py
  56. 3 0
      celery/contrib/rdb.py
  57. 4 0
      celery/datastructures.py
  58. 2 0
      celery/events/__init__.py
  59. 2 0
      celery/events/cursesmon.py
  60. 2 0
      celery/events/dumper.py
  61. 2 0
      celery/events/snapshot.py
  62. 17 8
      celery/exceptions.py
  63. 9 1
      celery/five.py
  64. 2 0
      celery/fixups/django.py
  65. 2 0
      celery/loaders/__init__.py
  66. 2 0
      celery/loaders/app.py
  67. 2 0
      celery/loaders/base.py
  68. 2 0
      celery/loaders/default.py
  69. 2 0
      celery/local.py
  70. 8 1
      celery/platforms.py
  71. 3 0
      celery/result.py
  72. 4 0
      celery/schedules.py
  73. 9 0
      celery/signals.py
  74. 4 0
      celery/states.py
  75. 2 0
      celery/task/base.py
  76. 3 0
      celery/task/http.py
  77. 7 1
      celery/task/sets.py
  78. 11 1
      celery/tests/case.py
  79. 2 2
      celery/tests/concurrency/test_processes.py
  80. 2 2
      celery/tests/fixups/test_django.py
  81. 5 1
      celery/utils/__init__.py
  82. 13 9
      celery/utils/debug.py
  83. 3 1
      celery/utils/dispatch/__init__.py
  84. 2 0
      celery/utils/dispatch/saferef.py
  85. 2 0
      celery/utils/dispatch/signal.py
  86. 4 0
      celery/utils/functional.py
  87. 5 0
      celery/utils/imports.py
  88. 2 0
      celery/utils/iso8601.py
  89. 5 0
      celery/utils/log.py
  90. 1 0
      celery/utils/mail.py
  91. 2 0
      celery/utils/objects.py
  92. 4 0
      celery/utils/serialization.py
  93. 2 0
      celery/utils/sysinfo.py
  94. 3 2
      celery/utils/term.py
  95. 4 0
      celery/utils/text.py
  96. 11 8
      celery/utils/threads.py
  97. 9 4
      celery/utils/timeutils.py
  98. 2 0
      celery/worker/__init__.py
  99. 5 0
      celery/worker/autoreload.py
  100. 2 0
      celery/worker/autoscale.py

+ 1 - 1
celery/__init__.py

@@ -15,7 +15,7 @@ __contact__ = 'ask@celeryproject.org'
 __homepage__ = 'http://celeryproject.org'
 __docformat__ = 'restructuredtext'
 __all__ = [
-    'celery', 'bugreport', 'shared_task', 'task',
+    'Celery', 'bugreport', 'shared_task', 'task',
     'current_app', 'current_task',
     'chain', 'chord', 'chunks', 'group', 'subtask',
     'xmap', 'xstarmap', 'uuid', 'version', '__version__',

+ 2 - 0
celery/__main__.py

@@ -4,6 +4,8 @@ import sys
 
 from os.path import basename
 
+__all__ = ['main']
+
 DEPRECATED_FMT = """
 The {old!r} command is deprecated, please use {new!r} instead:
 

+ 3 - 0
celery/_state.py

@@ -19,6 +19,9 @@ import weakref
 from celery.local import Proxy
 from celery.utils.threads import LocalStack
 
+__all__ = ['set_default_app', 'get_current_app', 'get_current_task',
+           'get_current_worker_task', 'current_app', 'current_task']
+
 #: Global default app used when no current app.
 default_app = None
 

+ 6 - 2
celery/app/__init__.py

@@ -14,7 +14,7 @@ from collections import Callable
 
 from celery.local import Proxy
 from celery import _state
-from celery._state import (  # noqa
+from celery._state import (
     set_default_app,
     get_current_app as current_app,
     get_current_task as current_task,
@@ -23,7 +23,11 @@ from celery._state import (  # noqa
 from celery.utils import gen_task_name
 
 from .builtins import shared_task as _shared_task
-from .base import Celery, AppPickler  # noqa
+from .base import Celery, AppPickler
+
+__all__ = ['Celery', 'AppPickler', 'default_app', 'app_or_default',
+           'bugreport', 'enable_trace', 'disable_trace', 'shared_task',
+           'set_default_app', 'current_app', 'current_task']
 
 #: Proxy always returning the app set as default.
 default_app = Proxy(lambda: _state.default_app)

+ 2 - 0
celery/app/amqp.py

@@ -24,6 +24,8 @@ from celery.utils.text import indent as textindent
 from . import app_or_default
 from . import routes as _routes
 
+__all__ = ['AMQP', 'Queues', 'TaskProducer', 'TaskConsumer']
+
 #: Human readable queue declaration.
 QUEUE_FORMAT = """
 .> {0.name:<16} exchange={0.exchange.name}({0.exchange.type}) \

+ 5 - 3
celery/app/annotations.py

@@ -19,9 +19,7 @@ from celery.utils.imports import instantiate
 _first_match = firstmethod('annotate')
 _first_match_any = firstmethod('annotate_any')
 
-
-def resolve_all(anno, task):
-    return (x for x in (_first_match(anno, task), _first_match_any(anno)) if x)
+__all__ = ['MapAnnotation', 'prepare', 'resolve_all']
 
 
 class MapAnnotation(dict):
@@ -54,3 +52,7 @@ def prepare(annotations):
     elif not isinstance(annotations, (list, tuple)):
         annotations = (annotations, )
     return [expand_annotation(anno) for anno in annotations]
+
+
+def resolve_all(anno, task):
+    return (x for x in (_first_match(anno, task), _first_match_any(anno)) if x)

+ 2 - 0
celery/app/base.py

@@ -41,6 +41,8 @@ from .utils import (
     AppPickler, Settings, bugreport, _unpickle_app, _unpickle_app_v2, appstr,
 )
 
+__all__ = ['Celery']
+
 _EXECV = os.environ.get('FORKED_BY_MULTIPROCESSING')
 BUILTIN_FIXUPS = frozenset([
     'celery.fixups.django:fixup',

+ 2 - 0
celery/app/builtins.py

@@ -14,6 +14,8 @@ from collections import deque
 from celery._state import get_current_worker_task
 from celery.utils import uuid
 
+__all__ = ['shared_task', 'load_shared_tasks']
+
 #: global list of functions defining tasks that should be
 #: added to all apps.
 _shared_tasks = []

+ 2 - 0
celery/app/control.py

@@ -16,6 +16,8 @@ from kombu.utils import cached_property
 
 from celery.exceptions import DuplicateNodenameWarning
 
+__all__ = ['Inspect', 'Control', 'flatten_reply']
+
 W_DUPNODE = """\
 Received multiple replies from node name {0!r}.
 Please make sure you give each node a unique nodename using the `-n` option.\

+ 2 - 1
celery/app/defaults.py

@@ -17,6 +17,8 @@ from celery.five import items
 from celery.utils import strtobool
 from celery.utils.functional import memoize
 
+__all__ = ['Option', 'NAMESPACES', 'flatten', 'find']
+
 is_jython = sys.platform.startswith('java')
 is_pypy = hasattr(sys, 'pypy_version_info')
 
@@ -63,7 +65,6 @@ class Option(object):
         return '<Option: type->{0} default->{1!r}>'.format(self.type,
                                                            self.default)
 
-
 NAMESPACES = {
     'BROKER': {
         'URL': Option(None, type='string'),

+ 2 - 0
celery/app/log.py

@@ -32,6 +32,8 @@ from celery.utils.log import (
 )
 from celery.utils.term import colored
 
+__all__ = ['TaskFormatter', 'Logging']
+
 MP_LOG = os.environ.get('MP_LOG', False)
 
 

+ 2 - 0
celery/app/registry.py

@@ -16,6 +16,8 @@ from celery._state import get_current_app
 from celery.exceptions import NotRegistered
 from celery.five import items
 
+__all__ = ['TaskRegistry']
+
 
 class TaskRegistry(dict):
     NotRegistered = NotRegistered

+ 2 - 0
celery/app/routes.py

@@ -15,6 +15,8 @@ from celery.utils import lpmerge
 from celery.utils.functional import firstmethod, mlazy
 from celery.utils.imports import instantiate
 
+__all__ = ['MapRoute', 'Router', 'prepare']
+
 _first_route = firstmethod('route_for_task')
 
 

+ 2 - 0
celery/app/task.py

@@ -28,6 +28,8 @@ from .annotations import resolve_all as resolve_all_annotations
 from .registry import _unpickle_task_v2
 from .utils import appstr
 
+__all__ = ['Context', 'Task']
+
 #: extracts attributes related to publishing a message from an object.
 extract_exec_options = mattrgetter(
     'queue', 'routing_key', 'exchange', 'priority', 'expires',

+ 3 - 0
celery/app/trace.py

@@ -37,6 +37,9 @@ from celery.utils.serialization import (
     get_pickleable_etype,
 )
 
+__all__ = ['TraceInfo', 'build_tracer', 'trace_task', 'eager_trace_task',
+           'setup_worker_optimizations', 'reset_worker_optimizations']
+
 _logger = get_logger(__name__)
 
 send_prerun = signals.task_prerun.send

+ 2 - 0
celery/app/utils.py

@@ -20,6 +20,8 @@ from celery.utils.imports import qualname
 
 from .defaults import find
 
+__all__ = ['appstr', 'Settings', 'filter_hidden_settings', 'bugreport']
+
 #: Format used to generate bugreport information.
 BUGREPORT_INFO = """
 software -> celery:{celery_v} kombu:{kombu_v} py:{py_v}

+ 2 - 0
celery/apps/beat.py

@@ -20,6 +20,8 @@ from celery.utils.imports import qualname
 from celery.utils.log import LOG_LEVELS, get_logger
 from celery.utils.timeutils import humanize_seconds
 
+__all__ = ['Beat']
+
 STARTUP_INFO_FMT = """
 Configuration ->
     . broker -> {conninfo}

+ 2 - 0
celery/apps/worker.py

@@ -34,6 +34,8 @@ from celery.utils.log import get_logger, in_sighandler, set_in_sighandler
 from celery.utils.text import pluralize
 from celery.worker import WorkController
 
+__all__ = ['Worker']
+
 logger = get_logger(__name__)
 is_jython = sys.platform.startswith('java')
 is_pypy = hasattr(sys, 'pypy_version_info')

+ 2 - 0
celery/backends/__init__.py

@@ -18,6 +18,8 @@ from celery.five import reraise
 from celery.utils.imports import symbol_by_name
 from celery.utils.functional import memoize
 
+__all__ = ['get_backend_cls', 'get_backend_by_url']
+
 UNKNOWN_BACKEND = """\
 Unknown result backend: {0!r}.  Did you spell that correctly? ({1!r})\
 """

+ 2 - 0
celery/backends/amqp.py

@@ -28,6 +28,8 @@ from celery.utils.timeutils import maybe_s_to_ms
 
 from .base import BaseBackend
 
+__all__ = ['BacklogLimitExceeded', 'AMQPBackend']
+
 logger = get_logger(__name__)
 
 

+ 2 - 0
celery/backends/base.py

@@ -38,6 +38,8 @@ from celery.utils.serialization import (
     create_exception_cls,
 )
 
+__all__ = ['BaseBackend', 'KeyValueStoreBackend', 'DisabledBackend']
+
 EXCEPTION_ABLE_CODECS = frozenset(['pickle', 'yaml'])
 PY3 = sys.version_info >= (3, 0)
 

+ 2 - 0
celery/backends/cache.py

@@ -15,6 +15,8 @@ from celery.utils.functional import LRUCache
 
 from .base import KeyValueStoreBackend
 
+__all__ = ['CacheBackend']
+
 _imp = [None]
 
 REQUIRES_BACKEND = """\

+ 2 - 0
celery/backends/cassandra.py

@@ -25,6 +25,8 @@ from celery.utils.timeutils import maybe_timedelta, timedelta_seconds
 
 from .base import BaseBackend
 
+__all__ = ['CassandraBackend']
+
 logger = get_logger(__name__)
 
 

+ 2 - 0
celery/backends/couchbase.py

@@ -24,6 +24,8 @@ from celery.utils.timeutils import maybe_timedelta
 
 from .base import KeyValueStoreBackend
 
+__all__ = ['CouchBaseBackend']
+
 
 class CouchBaseBackend(KeyValueStoreBackend):
     bucket = 'default'

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

@@ -20,6 +20,8 @@ from celery.backends.base import BaseBackend
 from .models import Task, TaskSet
 from .session import ResultSession
 
+__all__ = ['DatabaseBackend']
+
 
 def _sqlalchemy_installed():
     try:

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

@@ -17,6 +17,8 @@ from celery import states
 
 from .session import ResultModelBase
 
+__all__ = ['Task', 'TaskSet']
+
 
 class Task(ResultModelBase):
     """Task result/status."""

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

@@ -20,6 +20,8 @@ _SETUP = defaultdict(lambda: False)
 _ENGINES = {}
 _SESSIONS = {}
 
+__all__ = ['ResultSession', 'get_engine', 'create_session']
+
 
 def get_engine(dburi, **kwargs):
     if dburi not in _ENGINES:

+ 2 - 0
celery/backends/mongodb.py

@@ -32,6 +32,8 @@ from celery.utils.timeutils import maybe_timedelta
 
 from .base import BaseBackend
 
+__all__ = ['MongoBackend']
+
 
 class Bunch(object):
 

+ 2 - 0
celery/backends/redis.py

@@ -22,6 +22,8 @@ except ImportError:         # pragma: no cover
     redis = None            # noqa
     ConnectionError = None  # noqa
 
+__all__ = ['RedisBackend']
+
 REDIS_MISSING = """\
 You need to install the redis library in order to use \
 the Redis result store backend."""

+ 2 - 0
celery/backends/rpc.py

@@ -16,6 +16,8 @@ from kombu.utils import cached_property
 from celery import current_task
 from celery.backends import amqp
 
+__all__ = ['RPCBackend']
+
 
 class RPCBackend(amqp.AMQPBackend):
 

+ 3 - 0
celery/beat.py

@@ -31,6 +31,9 @@ from .utils.imports import instantiate
 from .utils.timeutils import humanize_seconds
 from .utils.log import get_logger
 
+__all__ = ['SchedulingError', 'ScheduleEntry', 'Scheduler',
+           'PersistentScheduler', 'Service', 'EmbeddedService']
+
 logger = get_logger(__name__)
 debug, info, error, warning = (logger.debug, logger.info,
                                logger.error, logger.warning)

+ 3 - 1
celery/bin/__init__.py

@@ -1,3 +1,5 @@
 from __future__ import absolute_import
 
-from .base import Option  # noqa
+from .base import Option
+
+__all__ = ['Option']

+ 2 - 0
celery/bin/amqp.py

@@ -24,6 +24,8 @@ from celery.bin.base import Command
 from celery.five import string_t
 from celery.utils import strtobool
 
+__all__ = ['AMQPAdmin', 'AMQShell', 'Spec', 'amqp']
+
 # Map to coerce strings to other types.
 COERCE = {bool: strtobool}
 

+ 3 - 0
celery/bin/base.py

@@ -104,6 +104,9 @@ find_long_opt = re.compile(r'.+?(--.+?)(?:\s|,|$)')
 find_rst_ref = re.compile(r':\w+:`(.+?)`')
 find_sformat = re.compile(r'%(\w)')
 
+__all__ = ['Error', 'UsageError', 'Extensions', 'HelpFormatter',
+           'Command', 'Option', 'daemon_options']
+
 
 class Error(Exception):
     status = EX_FAILURE

+ 2 - 0
celery/bin/beat.py

@@ -46,6 +46,8 @@ from celery.platforms import detached
 
 from celery.bin.base import Command, Option, daemon_options
 
+__all__ = ['beat']
+
 
 class beat(Command):
     """Start the beat periodic task scheduler.

+ 2 - 0
celery/bin/celery.py

@@ -31,6 +31,8 @@ from celery.bin.events import events
 from celery.bin.graph import graph
 from celery.bin.worker import worker
 
+__all__ = ['CeleryCommand', 'main']
+
 HELP = """
 ---- -- - - ---- Commands- -------------- --- ------------
 

+ 2 - 0
celery/bin/celeryd_detach.py

@@ -23,6 +23,8 @@ from celery.utils.log import get_logger
 
 from celery.bin.base import daemon_options, Option
 
+__all__ = ['detached_celeryd', 'detach']
+
 logger = get_logger(__name__)
 
 OPTION_LIST = daemon_options(default_pidfile='celeryd.pid') + (

+ 2 - 0
celery/bin/events.py

@@ -44,6 +44,8 @@ from functools import partial
 from celery.platforms import detached, set_process_title, strargv
 from celery.bin.base import Command, Option, daemon_options
 
+__all__ = ['events']
+
 
 class events(Command):
     """Event-stream utilities.

+ 2 - 0
celery/bin/graph.py

@@ -15,6 +15,8 @@ from celery.five import items
 
 from .base import Command
 
+__all__ = ['graph']
+
 
 class graph(Command):
     args = """<TYPE> [arguments]

+ 2 - 0
celery/bin/multi.py

@@ -114,6 +114,8 @@ from celery.platforms import Pidfile, IS_WINDOWS
 from celery.utils import term, nodesplit
 from celery.utils.text import pluralize
 
+__all__ = ['MultiTool']
+
 SIGNAMES = set(sig for sig in dir(signal)
                if sig.startswith('SIG') and '_' not in sig)
 SIGMAP = dict((getattr(signal, name), name) for name in SIGNAMES)

+ 2 - 0
celery/bin/worker.py

@@ -124,6 +124,8 @@ from celery.bin.celeryd_detach import detached_celeryd
 from celery.five import string_t
 from celery.utils.log import LOG_LEVELS, mlevel
 
+__all__ = ['worker', 'main']
+
 __MODULE_DOC__ = __doc__
 
 

+ 2 - 0
celery/bootsteps.py

@@ -26,6 +26,8 @@ try:
 except ImportError:  # pragma: no cover
     IGNORE_ERRORS = ()
 
+__all__ = ['Blueprint', 'Step', 'StartStopStep', 'ConsumerStep']
+
 #: Default socket timeout at shutdown.
 SHUTDOWN_SOCKET_TIMEOUT = 5.0
 

+ 3 - 0
celery/canvas.py

@@ -28,6 +28,9 @@ from celery.utils.functional import (
 )
 from celery.utils.text import truncate
 
+__all__ = ['Signature', 'chain', 'xmap', 'xstarmap', 'chunks',
+           'group', 'chord', 'subtask', 'maybe_subtask']
+
 
 class _getitem_property(object):
     """Attribute -> dict key descriptor.

+ 2 - 0
celery/concurrency/__init__.py

@@ -13,6 +13,8 @@ from __future__ import absolute_import
 # too much (e.g. for eventlet patching)
 from kombu.utils import symbol_by_name
 
+__all__ = ['get_implementation']
+
 ALIASES = {
     'processes': 'celery.concurrency.processes:TaskPool',
     'eventlet': 'celery.concurrency.eventlet:TaskPool',

+ 2 - 0
celery/concurrency/base.py

@@ -17,6 +17,8 @@ from kombu.utils.encoding import safe_repr
 from celery.utils import timer2
 from celery.utils.log import get_logger
 
+__all__ = ['BasePool', 'apply_target']
+
 logger = get_logger('celery.pool')
 
 

+ 2 - 0
celery/concurrency/eventlet.py

@@ -11,6 +11,8 @@ from __future__ import absolute_import
 import os
 import sys
 
+__all__ = ['TaskPool']
+
 EVENTLET_NOPATCH = os.environ.get('EVENTLET_NOPATCH', False)
 EVENTLET_DBLOCK = int(os.environ.get('EVENTLET_NOBLOCK', 0))
 W_RACE = """\

+ 2 - 0
celery/concurrency/gevent.py

@@ -33,6 +33,8 @@ from celery.utils import timer2
 
 from .base import apply_target, BasePool
 
+__all__ = ['TaskPool']
+
 
 def apply_timeout(target, args=(), kwargs={}, callback=None,
                   accept_callback=None, pid=None, timeout=None,

+ 2 - 0
celery/concurrency/processes.py

@@ -51,6 +51,8 @@ from celery.five import Counter, items, values
 from celery.utils.log import get_logger
 from celery.worker.hub import READ, WRITE, ERR
 
+__all__ = ['TaskPool']
+
 #: List of signals to reset when a child process starts.
 WORKER_SIGRESET = frozenset(['SIGTERM',
                              'SIGHUP',

+ 2 - 0
celery/concurrency/solo.py

@@ -12,6 +12,8 @@ import os
 
 from .base import BasePool, apply_target
 
+__all__ = ['TaskPool']
+
 
 class TaskPool(BasePool):
     """Solo task pool (blocking, inline, fast)."""

+ 2 - 0
celery/concurrency/threads.py

@@ -12,6 +12,8 @@ from celery.five import UserDict
 
 from .base import apply_target, BasePool
 
+__all__ = ['TaskPool']
+
 
 class NullDict(UserDict):
 

+ 2 - 0
celery/contrib/abortable.py

@@ -86,6 +86,8 @@ from __future__ import absolute_import
 from celery.task.base import Task
 from celery.result import AsyncResult
 
+__all__ = ['AbortableAsyncResult', 'AbortableTask']
+
 
 """
 Task States

+ 2 - 0
celery/contrib/batches.py

@@ -91,6 +91,8 @@ from celery.utils.log import get_logger
 from celery.worker.job import Request
 from celery.utils import noop
 
+__all__ = ['Batches']
+
 logger = get_logger(__name__)
 
 

+ 1 - 0
celery/contrib/bundles.py

@@ -11,6 +11,7 @@ from __future__ import absolute_import
 from celery import VERSION
 from bundle.extensions import Dist
 
+__all__ = ['bundles']
 
 defaults = {'author': 'Celery Project',
             'author_email': 'bundles@celeryproject.org',

+ 2 - 0
celery/contrib/methods.py

@@ -100,6 +100,8 @@ from __future__ import absolute_import
 
 from celery import current_app
 
+__all__ = ['task_method', 'task']
+
 
 class task_method(object):
 

+ 4 - 0
celery/contrib/migrate.py

@@ -22,6 +22,10 @@ from celery.app import app_or_default
 from celery.five import string, string_t
 from celery.utils import worker_direct
 
+__all__ = ['StopFiltering', 'State', 'republish', 'migrate_task',
+           'migrate_tasks', 'move', 'task_id_eq', 'task_id_in',
+           'start_filter', 'move_task_by_id', 'move_by_idmap',
+           'move_by_taskmap', 'move_direct', 'move_direct_by_id']
 
 MOVING_PROGRESS_FMT = """\
 Moving task {state.filtered}/{state.strtotal}: \

+ 3 - 0
celery/contrib/rdb.py

@@ -48,6 +48,9 @@ from billiard import current_process
 from celery.five import range
 from celery.platforms import ignore_errno
 
+__all__ = ['CELERY_RDB_HOST', 'CELERY_RDB_PORT', 'default_port',
+           'Rdb', 'debugger', 'set_trace']
+
 default_port = 6899
 
 CELERY_RDB_HOST = os.environ.get('CELERY_RDB_HOST') or '127.0.0.1'

+ 4 - 0
celery/datastructures.py

@@ -34,6 +34,10 @@ DOT_ATTRSEP = ', '
 DOT_DIRS = {'graph': '--', 'digraph': '->'}
 DOT_TAIL = '{IN}}}'
 
+__all__ = ['GraphFormatter', 'CycleError', 'DependencyGraph',
+           'AttributeDictMixin', 'AttributeDict', 'DictAttribute',
+           'ConfigurationView', 'LimitedSet']
+
 
 class GraphFormatter(object):
     _attr = DOT_ATTR.strip()

+ 2 - 0
celery/events/__init__.py

@@ -29,6 +29,8 @@ from celery.utils import uuid
 from celery.utils.functional import dictfilter
 from celery.utils.timeutils import adjust_timestamp, utcoffset, maybe_s_to_ms
 
+__all__ = ['Events', 'Event', 'EventDispatcher', 'EventReceiver']
+
 event_exchange = Exchange('celeryev', type='topic')
 
 _TZGETTER = itemgetter('utcoffset', 'timestamp')

+ 2 - 0
celery/events/cursesmon.py

@@ -24,6 +24,8 @@ from celery.app import app_or_default
 from celery.five import items, values
 from celery.utils.text import abbr, abbrtask
 
+__all__ = ['CursesMonitor', 'evtop']
+
 BORDER_SPACING = 4
 LEFT_BORDER_OFFSET = 3
 UUID_WIDTH = 36

+ 2 - 0
celery/events/dumper.py

@@ -17,6 +17,8 @@ from celery.app import app_or_default
 from celery.utils.functional import LRUCache
 from celery.utils.timeutils import humanize_seconds
 
+__all__ = ['Dumper', 'evdump']
+
 TASK_NAMES = LRUCache(limit=0xFFF)
 
 HUMAN_TYPES = {'worker-offline': 'shutdown',

+ 2 - 0
celery/events/snapshot.py

@@ -22,6 +22,8 @@ from celery.utils.imports import instantiate
 from celery.utils.log import get_logger
 from celery.utils.timeutils import rate
 
+__all__ = ['Polaroid', 'evcam']
+
 logger = get_logger('celery.evcam')
 
 

+ 17 - 8
celery/exceptions.py

@@ -14,6 +14,15 @@ from billiard.exceptions import (  # noqa
     SoftTimeLimitExceeded, TimeLimitExceeded, WorkerLostError, Terminated,
 )
 
+__all__ = ['SecurityError', 'Ignore', 'SystemTerminate', 'QueueNotFound',
+           'ImproperlyConfigured', 'NotRegistered', 'AlreadyRegistered',
+           'TimeoutError', 'MaxRetriesExceededError', 'RetryTaskError',
+           'TaskRevokedError', 'NotConfigured', 'AlwaysEagerIgnored',
+           'InvalidTaskError', 'ChordError', 'CPendingDeprecationWarning',
+           'CDeprecationWarning', 'FixupWarning', 'DuplicateNodenameWarning',
+           'SoftTimeLimitExceeded', 'TimeLimitExceeded', 'WorkerLostError',
+           'Terminated']
+
 UNREGISTERED_FMT = """\
 Task of kind {0} is not registered, please make sure it's imported.\
 """
@@ -116,6 +125,14 @@ class InvalidTaskError(Exception):
     """The task has invalid data or is not properly constructed."""
 
 
+class IncompleteStream(Exception):
+    """Found the end of a stream of data, but the data is not yet complete."""
+
+
+class ChordError(Exception):
+    """A task part of the chord raised an exception."""
+
+
 class CPendingDeprecationWarning(PendingDeprecationWarning):
     pass
 
@@ -128,13 +145,5 @@ class FixupWarning(UserWarning):
     pass
 
 
-class IncompleteStream(Exception):
-    """Found the end of a stream of data, but the data is not yet complete."""
-
-
-class ChordError(Exception):
-    """A task part of the chord raised an exception."""
-
-
 class DuplicateNodenameWarning(UserWarning):
     """Multiple workers are using the same nodename."""

+ 9 - 1
celery/five.py

@@ -10,12 +10,20 @@
 """
 from __future__ import absolute_import
 
+__all__ = ['Counter', 'reload', 'UserList', 'UserDict', 'Queue', 'Empty',
+           'zip_longest', 'StringIO', 'BytesIO', 'map', 'string', 'string_t',
+           'long_t', 'text_t', 'range', 'int_types', 'items', 'keys', 'values',
+           'nextfun', 'reraise', 'WhateverIO', 'with_metaclass',
+           'OrderedDict', 'THREAD_TIMEOUT_MAX', 'format_d',
+           'class_property', 'reclassmethod', 'create_module',
+           'recreate_module']
+
 try:
     from collections import Counter
 except ImportError:  # pragma: no cover
     from collections import defaultdict
 
-    def Counter():
+    def Counter():  # noqa
         return defaultdict(int)
 
 ############## py3k #########################################################

+ 2 - 0
celery/fixups/django.py

@@ -12,6 +12,8 @@ from importlib import import_module
 from celery import signals
 from celery.exceptions import FixupWarning
 
+__all__ = ['DjangoFixup', 'fixup']
+
 ERR_NOT_INSTALLED = """\
 Environment variable DJANGO_SETTINGS_MODULE is defined
 but Django is not installed.  Will not apply Django fixups!

+ 2 - 0
celery/loaders/__init__.py

@@ -13,6 +13,8 @@ from celery._state import current_app
 from celery.utils import deprecated
 from celery.utils.imports import symbol_by_name, import_from_cwd
 
+__all__ = ['get_loader_cls']
+
 LOADER_ALIASES = {'app': 'celery.loaders.app:AppLoader',
                   'default': 'celery.loaders.default:Loader',
                   'django': 'djcelery.loaders:DjangoLoader'}

+ 2 - 0
celery/loaders/app.py

@@ -10,6 +10,8 @@ from __future__ import absolute_import
 
 from .base import BaseLoader
 
+__all__ = ['AppLoader']
+
 
 class AppLoader(BaseLoader):
     pass

+ 2 - 0
celery/loaders/base.py

@@ -27,6 +27,8 @@ from celery.utils.imports import (
     import_from_cwd, symbol_by_name, NotAPackage, find_module,
 )
 
+__all__ = ['BaseLoader']
+
 _RACE_PROTECTION = False
 CONFIG_INVALID_NAME = """\
 Error: Module '{module}' doesn't exist, or it's not a valid \

+ 2 - 0
celery/loaders/default.py

@@ -17,6 +17,8 @@ from celery.utils import strtobool
 
 from .base import BaseLoader
 
+__all__ = ['Loader', 'DEFAULT_CONFIG_MODULE']
+
 DEFAULT_CONFIG_MODULE = 'celeryconfig'
 
 #: Warns if configuration file is missing if :envvar:`C_WNOCONF` is set.

+ 2 - 0
celery/local.py

@@ -16,6 +16,8 @@ import importlib
 
 from .five import long_t, string
 
+__all__ = ['Proxy', 'PromiseProxy', 'try_import', 'maybe_evaluate']
+
 __module__ = __name__  # used by Proxy class body
 
 

+ 8 - 1
celery/platforms.py

@@ -30,6 +30,14 @@ resource = try_import('resource')
 pwd = try_import('pwd')
 grp = try_import('grp')
 
+__all__ = ['EX_OK', 'EX_FAILURE', 'EX_UNAVAILABLE', 'EX_USAGE', 'SYSTEM',
+           'IS_OSX', 'IS_WINDOWS', 'pyimplementation', 'LockFailed',
+           'get_fdmax', 'Pidfile', 'create_pidlock', 'fileno', 'maybe_fileno',
+           'close_open_fds', 'DaemonContext', 'detached', 'parse_uid',
+           'parse_gid', 'setgroups', 'initgroups', 'setgid', 'setuid',
+           'maybe_drop_privileges', 'signals', 'set_process_title',
+           'set_mp_process_title', 'get_errno_name', 'ignore_errno']
+
 # exitcodes
 EX_OK = getattr(os, 'EX_OK', 0)
 EX_FAILURE = 1
@@ -646,7 +654,6 @@ class Signals(object):
         for signal_name, handler in items(dict(_d_ or {}, **sigmap)):
             self[signal_name] = handler
 
-
 signals = Signals()
 get_signal = signals.signum                   # compat
 install_signal_handler = signals.__setitem__  # compat

+ 3 - 0
celery/result.py

@@ -23,6 +23,9 @@ from .datastructures import DependencyGraph, GraphFormatter
 from .exceptions import IncompleteStream, TimeoutError
 from .five import items, range, string_t
 
+__all__ = ['ResultBase', 'AsyncResult', 'ResultSet', 'GroupResult',
+           'EagerResult', 'from_serializable']
+
 
 class ResultBase(object):
     """Base class for all results"""

+ 4 - 0
celery/schedules.py

@@ -24,6 +24,10 @@ from .utils.timeutils import (
 )
 from .datastructures import AttributeDict
 
+__all__ = ['ParseException', 'schedule', 'crontab', 'crontab_parser',
+           'maybe_schedule']
+
+
 CRON_PATTERN_INVALID = """\
 Invalid crontab pattern. Valid range is {min}-{max}. \
 '{value}' was found.\

+ 9 - 0
celery/signals.py

@@ -15,6 +15,15 @@
 from __future__ import absolute_import
 from .utils.dispatch import Signal
 
+__all__ = ['task_sent', 'task_prerun', 'task_postrun', 'task_success',
+           'task_retry', 'task_failure', 'task_revoked', 'celeryd_init',
+           'celeryd_after_setup', 'worker_init', 'worker_process_init',
+           'worker_ready', 'worker_shutdown', 'setup_logging',
+           'after_setup_logger', 'after_setup_task_logger',
+           'beat_init', 'beat_embedded_init', 'eventlet_pool_started',
+           'eventlet_pool_preshutdown', 'eventlet_pool_postshutdown',
+           'eventlet_pool_apply']
+
 task_sent = Signal(providing_args=[
     'task_id', 'task', 'args', 'kwargs', 'eta', 'taskset',
 ])

+ 4 - 0
celery/states.py

@@ -59,6 +59,10 @@ Misc.
 """
 from __future__ import absolute_import
 
+__all__ = ['PENDING', 'RECEIVED', 'STARTED', 'SUCCESS', 'FAILURE',
+           'REVOKED', 'RETRY', 'IGNORED', 'READY_STATES', 'UNREADY_STATES',
+           'EXCEPTION_STATES', 'PROPAGATE_STATES', 'precedence', 'state']
+
 #: State precedence.
 #: None represents the precedence of an unknown state.
 #: Lower index means higher precedence.

+ 2 - 0
celery/task/base.py

@@ -19,6 +19,8 @@ from celery.five import class_property, reclassmethod
 from celery.schedules import maybe_schedule
 from celery.utils.log import get_task_logger
 
+__all__ = ['Task', 'PeriodicTask', 'task']
+
 #: list of methods that must be classmethods in the old API.
 _COMPAT_CLASSMETHODS = (
     'delay', 'apply_async', 'retry', 'apply', 'subtask_from_request',

+ 3 - 0
celery/task/http.py

@@ -22,6 +22,9 @@ from celery.five import items, reraise
 from celery.utils.log import get_task_logger
 from .base import Task as BaseTask
 
+__all__ = ['InvalidResponseError', 'RemoteExecuteError', 'UnknownStatusError',
+           'HttpDispatch', 'HttpDispatchTask', 'URL']
+
 GET_METHODS = frozenset(['GET', 'HEAD'])
 logger = get_task_logger(__name__)
 

+ 7 - 1
celery/task/sets.py

@@ -12,7 +12,13 @@ from __future__ import absolute_import
 from celery._state import get_current_worker_task
 from celery.app import app_or_default
 from celery.canvas import subtask, maybe_subtask  # noqa
-from celery.utils import uuid
+from celery.utils import uuid, warn_deprecated
+
+warn_deprecated(
+    'celery.task.sets and TaskSet', removal='4.0',
+    alternative="""\
+Please use "group" instead (see the Canvas section in the userguide)\
+""")
 
 
 class TaskSet(list):

+ 11 - 1
celery/tests/case.py

@@ -25,7 +25,7 @@ from types import ModuleType
 try:
     from unittest import mock
 except ImportError:
-    import mock
+    import mock  # noqa
 from nose import SkipTest
 from kombu.log import NullHandler
 from kombu.utils import nested
@@ -36,6 +36,16 @@ from celery.five import (
 )
 from celery.utils.functional import noop
 
+__all__ = [
+    'Case', 'AppCase', 'Mock', 'patch', 'call', 'skip_unless_module',
+    'wrap_logger', 'eager_tasks', 'with_environ', 'sleepdeprived',
+    'skip_if_environ', 'skip_if_quick', 'todo', 'skip', 'skip_if',
+    'skip_unless', 'mask_modules', 'override_stdouts', 'mock_module',
+    'replace_module_value', 'sys_platform', 'reset_modules',
+    'patch_modules', 'mock_context', 'mock_open', 'patch_many',
+    'patch_settings', 'assert_signal_called', 'skip_if_pypy',
+    'skip_if_jython', 'body_from_sig', 'restore_logging',
+]
 patch = mock.patch
 call = mock.call
 

+ 2 - 2
celery/tests/concurrency/test_processes.py

@@ -189,11 +189,11 @@ class test_AsynPool(PoolCase):
 
         with patch('select.select') as select:
 
-            def se(*args):
+            def se2(*args):
                 select.side_effect = socket.error()
                 select.side_effect.errno = 1321
                 raise ebadf
-            select.side_effect = se
+            select.side_effect = se2
             with self.assertRaises(socket.error):
                 mp._select(set([3]))
 

+ 2 - 2
celery/tests/fixups/test_django.py

@@ -54,11 +54,11 @@ class test_DjangoFixup(AppCase):
             sym.side_effect = se
             self.assertTrue(DjangoFixup(self.app)._now)
 
-            def se(name):
+            def se2(name):
                 if name == 'django.db:close_old_connections':
                     raise ImportError()
                 return Mock()
-            sym.side_effect = se
+            sym.side_effect = se2
             self.assertIsNone(DjangoFixup(self.app)._close_old_connections)
 
     def test_install(self):

+ 5 - 1
celery/utils/__init__.py

@@ -23,7 +23,11 @@ from kombu.entity import Exchange, Queue
 from celery.exceptions import CPendingDeprecationWarning, CDeprecationWarning
 from celery.five import StringIO, items, reraise, string_t
 
-from .functional import noop
+__all__ = ['worker_direct', 'warn_deprecated', 'deprecated', 'lpmerge',
+           'is_iterable', 'isatty', 'cry', 'maybe_reraise', 'strtobool',
+           'jsonify', 'gen_task_name', 'nodename', 'nodesplit',
+           'cached_property']
+
 
 PENDING_DEPRECATION_FMT = """
     {description} is scheduled for deprecation in \

+ 13 - 9
celery/utils/debug.py

@@ -21,6 +21,19 @@ try:
 except ImportError:
     Process = None  # noqa
 
+__all__ = [
+    'blockdetection', 'sample_mem', 'memdump', 'sample',
+    'humanbytes', 'mem_rss', 'ps',
+]
+
+UNITS = (
+    (2 ** 40.0, 'TB'),
+    (2 ** 30.0, 'GB'),
+    (2 ** 20.0, 'MB'),
+    (2 ** 10.0, 'kB'),
+    (0.0, '{0!d}b'),
+)
+
 _process = None
 _mem_sample = []
 
@@ -108,15 +121,6 @@ def sample(x, n, k=0):
         k += j
 
 
-UNITS = (
-    (2 ** 40.0, 'TB'),
-    (2 ** 30.0, 'GB'),
-    (2 ** 20.0, 'MB'),
-    (2 ** 10.0, 'kB'),
-    (0.0, '{0!d}b'),
-)
-
-
 def hfloat(f, p=5):
     """Converts float to value suitable for humans.
 

+ 3 - 1
celery/utils/dispatch/__init__.py

@@ -1,4 +1,6 @@
 # -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
-from .signal import Signal  # noqa
+from .signal import Signal
+
+__all__ = ['Signal']

+ 2 - 0
celery/utils/dispatch/saferef.py

@@ -12,6 +12,8 @@ import traceback
 
 from collections import Callable
 
+__all__ = ['safe_ref']
+
 
 def safe_ref(target, on_delete=None):  # pragma: no cover
     """Return a *safe* weak reference to a callable target

+ 2 - 0
celery/utils/dispatch/signal.py

@@ -7,6 +7,8 @@ from collections import Callable
 from . import saferef
 from celery.five import range
 
+__all__ = ['Signal']
+
 WEAKREF_TYPES = (weakref.ReferenceType, saferef.BoundMethodWeakref)
 
 

+ 4 - 0
celery/utils/functional.py

@@ -20,6 +20,10 @@ from kombu.utils.compat import OrderedDict
 
 from celery.five import UserDict, UserList, items, keys, string_t
 
+__all__ = ['LRUCache', 'is_list', 'maybe_list', 'memoize', 'mlazy', 'noop',
+           'first', 'firstmethod', 'chunks', 'padlist', 'mattrgetter', 'uniq',
+           'regen', 'dictfilter', 'lazy', 'maybe_evaluate']
+
 KEYWORD_MARK = object()
 
 

+ 5 - 0
celery/utils/imports.py

@@ -19,6 +19,11 @@ from kombu.utils import symbol_by_name
 
 from celery.five import reload
 
+__all__ = [
+    'NotAPackage', 'qualname', 'instantiate', 'symbol_by_name', 'cwd_in_path',
+    'find_module', 'import_from_cwd', 'reload_from_cwd', 'module_file',
+]
+
 
 class NotAPackage(Exception):
     pass

+ 2 - 0
celery/utils/iso8601.py

@@ -38,6 +38,8 @@ import re
 from datetime import datetime
 from pytz import FixedOffset
 
+__all__ = ['parse_iso8601']
+
 # Adapted from http://delete.me.uk/2005/03/iso8601.html
 ISO8601_REGEX = re.compile(
     r'(?P<year>[0-9]{4})(-(?P<month>[0-9]{1,2})(-(?P<day>[0-9]{1,2})'

+ 5 - 0
celery/utils/log.py

@@ -23,6 +23,11 @@ from celery.five import string_t
 from .encoding import safe_str, str_t
 from .term import colored
 
+__all__ = ['ColorFormatter', 'LoggingProxy' 'base_logger',
+           'set_in_sighandler', 'in_sighandler', 'get_logger',
+           'get_task_logger', 'mlevel', 'ensure_process_aware_logger',
+           'get_multiprocessing_logger', 'reset_multiprocessing_logger']
+
 _process_aware = False
 PY3 = sys.version_info[0] == 3
 

+ 1 - 0
celery/utils/mail.py

@@ -23,6 +23,7 @@ except ImportError:  # pragma: no cover
     class SSLError(Exception):  # noqa
         """fallback used when ssl module not compiled."""
 
+__all__ = ['SendmailWarning', 'Message', 'Mailer', 'ErrorMail']
 
 _local_hostname = None
 

+ 2 - 0
celery/utils/objects.py

@@ -8,6 +8,8 @@
 """
 from __future__ import absolute_import
 
+__all__ = ['mro_lookup']
+
 
 def mro_lookup(cls, attr, stop=(), monkey_patched=[]):
     """Returns the first node by MRO order that defines an attribute.

+ 4 - 0
celery/utils/serialization.py

@@ -18,6 +18,10 @@ except ImportError:
 
 from .encoding import safe_repr
 
+__all__ = ['UnpickleableExceptionWrapper', 'subclass_exception',
+           'find_pickleable_exception', 'create_exception_cls',
+           'get_pickleable_exception', 'get_pickleable_etype',
+           'get_pickled_exception']
 
 #: List of base classes we probably don't want to reduce to.
 try:

+ 2 - 0
celery/utils/sysinfo.py

@@ -7,6 +7,8 @@ from math import ceil
 
 from kombu.utils import cached_property
 
+__all__ = ['load_average', 'df']
+
 
 if hasattr(os, 'getloadavg'):
 

+ 3 - 2
celery/utils/term.py

@@ -15,14 +15,15 @@ from functools import reduce
 from kombu.utils.encoding import safe_str
 from celery.five import string
 
+__all__ = ['colored']
+
 BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
 OP_SEQ = '\033[%dm'
 RESET_SEQ = '\033[0m'
 COLOR_SEQ = '\033[1;%dm'
 fg = lambda s: COLOR_SEQ % s
 
-SYSTEM = platform.system()
-IS_WINDOWS = SYSTEM == 'Windows'
+IS_WINDOWS = platform.system() == 'Windows'
 
 
 class colored(object):

+ 4 - 0
celery/utils/text.py

@@ -12,6 +12,10 @@ from textwrap import fill
 
 from pprint import pformat
 
+__all__ = ['dedent_initial', 'dedent', 'fill_paragraphs', 'join',
+           'ensure_2lines', 'abbr', 'abbrtask', 'indent', 'truncate',
+           'pluralize', 'pretty']
+
 
 def dedent_initial(s, n=4):
     return s[n:] if s[:n] == ' ' * n else s

+ 11 - 8
celery/utils/threads.py

@@ -19,10 +19,21 @@ from contextlib import contextmanager
 from celery.local import Proxy
 from celery.five import THREAD_TIMEOUT_MAX, items
 
+__all__ = ['bgThread', 'Local', 'LocalStack', 'LocalManager',
+           'get_ident', 'default_socket_timeout']
+
 USE_FAST_LOCALS = os.environ.get('USE_FAST_LOCALS')
 PY3 = sys.version_info[0] == 3
 
 
+@contextmanager
+def default_socket_timeout(timeout):
+    prev = socket.getdefaulttimeout()
+    socket.setdefaulttimeout(timeout)
+    yield
+    socket.setdefaulttimeout(prev)
+
+
 class bgThread(threading.Thread):
 
     def __init__(self, name=None, **kwargs):
@@ -291,14 +302,6 @@ class LocalManager(object):
             self.__class__.__name__, len(self.locals))
 
 
-@contextmanager
-def default_socket_timeout(timeout):
-    prev = socket.getdefaulttimeout()
-    socket.setdefaulttimeout(timeout)
-    yield
-    socket.setdefaulttimeout(prev)
-
-
 class _FastLocalStack(threading.local):
 
     def __init__(self):

+ 9 - 4
celery/utils/timeutils.py

@@ -24,6 +24,12 @@ from .functional import dictfilter
 from .iso8601 import parse_iso8601
 from .text import pluralize
 
+__all__ = ['LocalTimezone', 'timezone', 'maybe_timedelta', 'timedelta_seconds',
+           'delta_resolution', 'remaining', 'rate', 'weekday',
+           'humanize_seconds', 'maybe_iso8601', 'is_naive', 'make_aware',
+           'localize', 'to_utc', 'maybe_make_aware', 'ffwd', 'utcoffset',
+           'adjust_timestamp', 'maybe_s_to_ms']
+
 C_REMDEBUG = os.environ.get('C_REMDEBUG', False)
 
 DAYNAMES = 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'
@@ -44,6 +50,9 @@ ZERO = timedelta(0)
 
 _local_timezone = None
 
+__timezone__ = -_time.timezone
+__altzone__ = -_time.altzone
+
 
 class LocalTimezone(tzinfo):
     """Local time implementation taken from Python's docs.
@@ -348,10 +357,6 @@ class ffwd(object):
         }, **extra)
 
 
-__timezone__ = -_time.timezone
-__altzone__ = -_time.altzone
-
-
 def utcoffset():
     if _time.daylight:
         return (__timezone__ + __altzone__) // 3600

+ 2 - 0
celery/worker/__init__.py

@@ -38,6 +38,8 @@ from celery.utils.log import mlevel, worker_logger as logger
 
 from . import state
 
+__all__ = ['WorkController', 'default_nodename']
+
 UNKNOWN_QUEUE = """\
 Trying to select queue subset of {0!r}, but queue {1} is not
 defined in the CELERY_QUEUES setting.

+ 5 - 0
celery/worker/autoreload.py

@@ -35,6 +35,11 @@ except ImportError:         # pragma: no cover
     pyinotify = None        # noqa
     _ProcessEvent = object  # noqa
 
+__all__ = [
+    'WorkerComponent', 'Autoreloader', 'Monitor' 'BaseMonitor',
+    'StatMonitor', 'KQueueMonitor', 'InotifyMonitor', 'file_hash',
+]
+
 logger = get_logger(__name__)
 
 

+ 2 - 0
celery/worker/autoscale.py

@@ -27,6 +27,8 @@ from . import state
 from .components import Pool
 from .hub import DummyLock
 
+__all__ = ['Autoscaler', 'WorkerComponent']
+
 logger = get_logger(__name__)
 debug, info, error = logger.debug, logger.info, logger.error
 

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