瀏覽代碼

Deprecates Python 2.4 support\!

Ask Solem 14 年之前
父節點
當前提交
3fd07db229
共有 2 個文件被更改,包括 31 次插入0 次删除
  1. 18 0
      Changelog
  2. 13 0
      celery/__init__.py

+ 18 - 0
Changelog

@@ -153,6 +153,24 @@ Important Notes
 .. _`Eventlet`: http://eventlet.net
 .. _`gevent`: http://gevent.org
 
+* Python 2.4 support deprecated!
+
+    We're happy^H^H^H^H^Hsad to announce that this is the last version
+    to support Python 2.4.
+
+    You are urged to make some noise if you're currently stuck with
+    Python 2.4.  Complain to your package maintainers, sysadmins and bosses:
+    tell them it's time to move on!
+
+    Apart from wanting to take advantage of with-statements, coroutines,
+    conditional expressions and enhanced try blocks, the code base
+    now contains so many 2.4 related hacks and workarounds it's no longer
+    just a compromise, but a sacrifice.
+
+    If it really isn't your choice, and you don't have the option to upgrade
+    to a newer version of Python, you can just continue to use Celery 2.2.
+    Important fixes can be backported for as long as there is interest.
+
 * `celeryd`: Now supports Autoscaling of child worker processes.
 
     The :option:`--autoscale` option can be used to configure the minimum

+ 13 - 0
celery/__init__.py

@@ -1,5 +1,6 @@
 """Distributed Task Queue"""
 import os
+import sys
 
 VERSION = (2, 2, 0, "rc1")
 
@@ -10,6 +11,18 @@ __homepage__ = "http://celeryproject.org"
 __docformat__ = "restructuredtext"
 
 
+if sys.version_info < (2, 5):
+    import warnings
+    warnings.warn(DeprecationWarning("""
+
+Python 2.4 support is deprecated and only versions 2.5, 2.6, 2.7+
+will be supported starting from Celery version 2.3.
+
+
+"""))
+
+
+
 def Celery(*args, **kwargs):
     from celery.app import App
     return App(*args, **kwargs)