__init__.py 780 B

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