Parcourir la source

Merge branch '2.4'

Ask Solem il y a 13 ans
Parent
commit
1a25a720b6

+ 9 - 0
Changelog

@@ -5,6 +5,15 @@
 .. contents::
     :local:
 
+.. _version-2.4.2:
+
+2.4.2
+=====
+:release-date: 2011-11-14 12:00 P.M GMT
+
+* Program module no longer uses relative imports so that it is
+  possible to do ``python -m celery.bin.name``.
+
 .. _version-2.4.1:
 
 2.4.1

+ 1 - 1
README.rst

@@ -4,7 +4,7 @@
 
 .. image:: http://cloud.github.com/downloads/ask/celery/celery_128.png
 
-:Version: 2.4.1
+:Version: 2.4.2
 :Web: http://celeryproject.org/
 :Download: http://pypi.python.org/pypi/celery/
 :Source: http://github.com/ask/celery/

+ 1 - 1
celery/__init__.py

@@ -8,7 +8,7 @@ from __future__ import absolute_import
 import os
 import sys
 
-VERSION = (2, 4, 1)
+VERSION = (2, 4, 2)
 
 __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:])
 __author__ = "Ask Solem"

+ 3 - 3
celery/bin/camqadm.py

@@ -15,10 +15,10 @@ from itertools import count
 
 from amqplib import client_0_8 as amqp
 
-from ..app import app_or_default
-from ..utils import padlist
+from celery.app import app_or_default
+from celery.utils import padlist
 
-from .base import Command
+from celery.bin.base import Command
 
 # Valid string -> bool coercions.
 BOOLS = {"1": True, "0": False,

+ 2 - 2
celery/bin/celerybeat.py

@@ -29,9 +29,9 @@ import os
 
 from functools import partial
 
-from ..platforms import detached
+from celery.platforms import detached
 
-from .base import Command, Option, daemon_options
+from celery.bin.base import Command, Option, daemon_options
 
 
 class BeatCommand(Command):

+ 5 - 5
celery/bin/celeryctl.py

@@ -10,11 +10,11 @@ from textwrap import wrap
 
 from anyjson import deserialize
 
-from .. import __version__
-from ..app import app_or_default, current_app
-from ..utils import term
+from celery import __version__
+from celery.app import app_or_default, current_app
+from celeryutils import term
 
-from .base import Command as CeleryCommand
+from celery.bin.base import Command as CeleryCommand
 
 
 commands = {}
@@ -204,7 +204,7 @@ class result(Command):
     )
 
     def run(self, task_id, *args, **kwargs):
-        from .. import registry
+        from celery import registry
         result_cls = self.app.AsyncResult
         task = kwargs.get("task")
 

+ 2 - 2
celery/bin/celeryd.py

@@ -80,7 +80,7 @@ try:
 except ImportError:  # pragma: no cover
     freeze_support = lambda: True  # noqa
 
-from .base import Command, Option
+from celery.bin.base import Command, Option
 
 
 class WorkerCommand(Command):
@@ -92,7 +92,7 @@ class WorkerCommand(Command):
         kwargs.pop("app", None)
         # Pools like eventlet/gevent needs to patch libs as early
         # as possible.
-        from .. import concurrency
+        from celery import concurrency
         kwargs["pool"] = concurrency.get_implementation(
                     kwargs.get("pool") or self.app.conf.CELERYD_POOL)
         return self.app.Worker(**kwargs).run()

+ 3 - 3
celery/bin/celeryd_detach.py

@@ -7,10 +7,10 @@ import sys
 
 from optparse import OptionParser, BadOptionError
 
-from .. import __version__
-from ..platforms import detached
+from celery import __version__
+from celery.platforms import detached
 
-from .base import daemon_options
+from celery.bin.base import daemon_options
 
 OPTION_LIST = daemon_options(default_pidfile="celeryd.pid")
 

+ 5 - 5
celery/bin/celeryd_multi.py

@@ -98,10 +98,10 @@ from collections import defaultdict
 from subprocess import Popen
 from time import sleep
 
-from .. import __version__
-from ..platforms import shellsplit
-from ..utils import term
-from ..utils.encoding import from_utf8
+from celery import __version__
+from celery.platforms import shellsplit
+from celery.utils import term
+from celery.utils.encoding import from_utf8
 
 SIGNAMES = set(sig for sig in dir(signal)
                         if sig.startswith("SIG") and "_" not in sig)
@@ -290,7 +290,7 @@ class MultiTool(object):
             self.note("")
 
     def getpids(self, p, cmd, callback=None):
-        from .. import platforms
+        from celery import platforms
         pidfile_template = p.options.setdefault("--pidfile", "celeryd@%n.pid")
 
         nodes = []

+ 6 - 6
celery/bin/celeryev.py

@@ -7,10 +7,10 @@ import sys
 
 from functools import partial
 
-from .. import platforms
-from ..platforms import detached
+from celery import platforms
+from celery.platforms import detached
 
-from .base import Command, Option, daemon_options
+from celery.bin.base import Command, Option, daemon_options
 
 
 class EvCommand(Command):
@@ -41,19 +41,19 @@ class EvCommand(Command):
             os.chdir(workdir)
 
     def run_evdump(self):
-        from ..events.dumper import evdump
+        from celery.events.dumper import evdump
         self.set_process_status("dump")
         return evdump(app=self.app)
 
     def run_evtop(self):
-        from ..events.cursesmon import evtop
+        from celery.events.cursesmon import evtop
         self.set_process_status("top")
         return evtop(app=self.app)
 
     def run_evcam(self, camera, logfile=None, pidfile=None, uid=None,
             gid=None, umask=None, working_directory=None,
             detach=False, **kwargs):
-        from ..events.snapshot import evcam
+        from celery.events.snapshot import evcam
         workdir = working_directory
         self.set_process_status("cam")
         kwargs["app"] = self.app

+ 1 - 1
docs/includes/introduction.txt

@@ -1,4 +1,4 @@
-:Version: 2.4.1
+:Version: 2.4.2
 :Web: http://celeryproject.org/
 :Download: http://pypi.python.org/pypi/celery/
 :Source: http://github.com/ask/celery/