__init__.py 874 B

123456789101112131415161718192021222324252627282930313233
  1. """Distributed Task Queue"""
  2. # :copyright: (c) 2009 - 2011 by Ask Solem.
  3. # :license: BSD, see LICENSE for more details.
  4. import os
  5. import sys
  6. VERSION = (2, 2, 0, "rc2")
  7. __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:])
  8. __author__ = "Ask Solem"
  9. __contact__ = "ask@celeryproject.org"
  10. __homepage__ = "http://celeryproject.org"
  11. __docformat__ = "restructuredtext"
  12. if sys.version_info < (2, 5):
  13. import warnings
  14. warnings.warn(DeprecationWarning("""
  15. Python 2.4 support is deprecated and only versions 2.5, 2.6, 2.7+
  16. will be supported starting from Celery version 2.3.
  17. """))
  18. def Celery(*args, **kwargs):
  19. from celery.app import App
  20. return App(*args, **kwargs)
  21. if not os.environ.get("CELERY_NO_EVAL", False):
  22. from celery.utils import LocalProxy, instantiate
  23. current_app = LocalProxy(lambda: instantiate("celery.app.current_app"))