__init__.py 933 B

1234567891011121314151617181920212223242526272829303132333435363738
  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, 3, 0, "a1")
  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.local import LocalProxy
  23. def _get_current_app():
  24. from celery.app import current_app
  25. return current_app()
  26. current_app = LocalProxy(_get_current_app)