Browse Source

Celery 3.2 is now Celery 4.0

Ask Solem 9 years ago
parent
commit
c53928b21a

+ 6 - 6
Changelog

@@ -4,15 +4,15 @@
  Change history
 ================
 
-This document contains change notes for bugfix releases in the 3.2.x series
-(Cipater), please see :ref:`whatsnew-3.2` for an overview of what's
-new in Celery 3.2.
+This document contains change notes for bugfix releases in the 4.0.x series
+(Cipater), please see :ref:`whatsnew-4.0` for an overview of what's
+new in Celery 4.0.
 
-.. _version-3.2.0:
+.. _version-4.0.0:
 
-3.2.0
+4.0.0
 =======
 :release-date: TBA
 :release-by:
 
-See :ref:`whatsnew-3.2`.
+See :ref:`whatsnew-4.0`.

+ 1 - 1
README.rst

@@ -6,7 +6,7 @@
 
 |build-status| |coverage-status|
 
-:Version: 3.2.0a1 (Cipater)
+:Version: 4.0.0a1 (Cipater)
 :Web: http://celeryproject.org/
 :Download: http://pypi.python.org/pypi/celery/
 :Source: http://github.com/celery/celery/

+ 2 - 2
celery/__init__.py

@@ -17,8 +17,8 @@ version_info_t = namedtuple(
     'version_info_t', ('major', 'minor', 'micro', 'releaselevel', 'serial'),
 )
 
-SERIES = 'DEV'
-VERSION = version_info_t(3, 2, 0, 'a2', '')
+SERIES = '0today8'
+VERSION = version_info_t(4, 0, 0, 'a1', '')
 __version__ = '{0.major}.{0.minor}.{0.micro}{0.releaselevel}'.format(VERSION)
 __author__ = 'Ask Solem'
 __contact__ = 'ask@celeryproject.org'

+ 2 - 2
celery/app/base.py

@@ -195,7 +195,7 @@ class Celery(object):
 
         # Signals
         if self.on_configure is None:
-            # used to be a method pre 3.2
+            # used to be a method pre 4.0
             self.on_configure = Signal()
         self.on_after_configure = Signal()
         self.on_after_finalize = Signal()
@@ -521,7 +521,7 @@ class Celery(object):
         if isinstance(self.on_configure, Signal):
             self.on_configure.send(sender=self)
         else:
-            # used to be a method pre 3.2
+            # used to be a method pre 4.0
             self.on_configure()
         if self._config_source:
             self.loader.config_from_object(self._config_source)

+ 2 - 2
celery/apps/worker.py

@@ -45,7 +45,7 @@ is_jython = sys.platform.startswith('java')
 is_pypy = hasattr(sys, 'pypy_version_info')
 
 W_PICKLE_DEPRECATED = """
-Starting from version 3.2 Celery will refuse to accept pickle by default.
+Starting from version 4.0 Celery will refuse to accept pickle by default.
 
 The pickle serializer is a security concern as it may give attackers
 the ability to execute any command.  It's important to secure
@@ -55,7 +55,7 @@ the default choice.
 
 If you depend on pickle then you should set a setting to disable this
 warning and to be sure that everything will continue working
-when you upgrade to Celery 3.2::
+when you upgrade to Celery 4.0::
 
     CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml']
 

+ 2 - 2
celery/backends/cassandra.py

@@ -51,8 +51,8 @@ class CassandraBackend(BaseBackend):
     supports_autoexpire = True
 
     @deprecated(description='The old cassandra backend',
-                deprecation='3.2',
-                removal='4.0',
+                deprecation='4.0',
+                removal='5.0',
                 alternative='Use the `new_cassandra` result backend instead')
     def __init__(self, servers=None, keyspace=None, column_family=None,
                  cassandra_options=None, detailed_mode=False, **kwargs):

+ 4 - 4
celery/backends/redis.py

@@ -264,18 +264,18 @@ class RedisBackend(KeyValueStoreBackend):
             (self.url,), {'expires': self.expires},
         )
 
-    @deprecated_property(3.2, 3.3)
+    @deprecated_property(4.0, 5.0)
     def host(self):
         return self.connparams['host']
 
-    @deprecated_property(3.2, 3.3)
+    @deprecated_property(4.0, 5.0)
     def port(self):
         return self.connparams['port']
 
-    @deprecated_property(3.2, 3.3)
+    @deprecated_property(4.0, 5.0)
     def db(self):
         return self.connparams['db']
 
-    @deprecated_property(3.2, 3.3)
+    @deprecated_property(4.0, 5.0)
     def password(self):
         return self.connparams['password']

+ 1 - 1
celery/events/__init__.py

@@ -394,7 +394,7 @@ class EventReceiver(ConsumerMixin):
         return type, body
 
     def _receive(self, body, message, list=list, isinstance=isinstance):
-        if isinstance(body, list):  # 3.2: List of events
+        if isinstance(body, list):  # celery 4.0: List of events
             process, from_message = self.process, self.event_from_message
             [process(*from_message(event)) for event in body]
         else:

+ 16 - 16
celery/events/state.py

@@ -200,25 +200,25 @@ class Worker(object):
     def id(self):
         return '{0.hostname}.{0.pid}'.format(self)
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def update_heartbeat(self, received, timestamp):
         self.event(None, timestamp, received)
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def on_online(self, timestamp=None, local_received=None, **fields):
         self.event('online', timestamp, local_received, fields)
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def on_offline(self, timestamp=None, local_received=None, **fields):
         self.event('offline', timestamp, local_received, fields)
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def on_heartbeat(self, timestamp=None, local_received=None, **fields):
         self.event('heartbeat', timestamp, local_received, fields)
 
     @class_property
     def _defaults(cls):
-        """Deprecated, to be removed in 3.3"""
+        """Deprecated, to be removed in 5.0"""
         source = cls()
         return {k: getattr(source, k) for k in cls._fields}
 
@@ -336,44 +336,44 @@ class Task(object):
     def ready(self):
         return self.state in states.READY_STATES
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def on_sent(self, timestamp=None, **fields):
         self.event('sent', timestamp, fields)
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def on_received(self, timestamp=None, **fields):
         self.event('received', timestamp, fields)
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def on_started(self, timestamp=None, **fields):
         self.event('started', timestamp, fields)
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def on_failed(self, timestamp=None, **fields):
         self.event('failed', timestamp, fields)
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def on_retried(self, timestamp=None, **fields):
         self.event('retried', timestamp, fields)
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def on_succeeded(self, timestamp=None, **fields):
         self.event('succeeded', timestamp, fields)
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def on_revoked(self, timestamp=None, **fields):
         self.event('revoked', timestamp, fields)
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def on_unknown_event(self, shortype, timestamp=None, **fields):
         self.event(shortype, timestamp, fields)
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def update(self, state, timestamp, fields,
                _state=states.state, RETRY=states.RETRY):
         return self.event(state, timestamp, None, fields)
 
-    @deprecated(3.2, 3.3)
+    @deprecated(4.0, 5.0)
     def merge(self, state, timestamp, fields):
         keep = self.merge_rules.get(state)
         if keep is not None:
@@ -383,7 +383,7 @@ class Task(object):
 
     @class_property
     def _defaults(cls):
-        """Deprecated, to be removed in 3.3."""
+        """Deprecated, to be removed in 5.0."""
         source = cls()
         return {k: getattr(source, k) for k in source._fields}
 

+ 2 - 2
celery/result.py

@@ -34,7 +34,7 @@ Never call result.get() within a task!
 See http://docs.celeryq.org/en/latest/userguide/tasks.html\
 #task-synchronous-subtasks
 
-In Celery 3.2 this will result in an exception being
+In Celery 4.0 this will result in an exception being
 raised instead of just being a warning.
 """
 
@@ -542,7 +542,7 @@ class ResultSet(ResultBase):
         """`res[i] -> res.results[i]`"""
         return self.results[index]
 
-    @deprecated('3.2', '3.3')
+    @deprecated('4.0', '5.0')
     def iterate(self, timeout=None, propagate=True, interval=0.5):
         """Deprecated method, use :meth:`get` with a callback argument."""
         elapsed = 0.0

+ 1 - 1
docs/configuration.rst

@@ -1813,7 +1813,7 @@ The default is 2 seconds.
 
 EMAIL_CHARSET
 ~~~~~~~~~~~~~
-.. versionadded:: 3.2.0
+.. versionadded:: 4.0
 
 Charset for outgoing emails. Default is "us-ascii".
 

+ 4 - 4
docs/history/changelog-3.1.rst

@@ -467,7 +467,7 @@ News
 
     See :ref:`redis-caveats`.
 
-    This will be the default in Celery 3.2.
+    This will be the default in Celery 4.0.
 
 - **Results**: The :class:`@AsyncResult` object now keeps a local cache
   of the final state of the task.
@@ -476,7 +476,7 @@ News
     and you can do so by setting :setting:`CELERY_MAX_CACHED_RESULTS` to
     :const:`-1`.  The lifetime of the cache will then be bound to the
     lifetime of the result object, which will be the default behavior
-    in Celery 3.2.
+    in Celery 4.0.
 
 - **Events**: The "Substantial drift" warning message is now logged once
   per node name only (Issue #1802).
@@ -682,7 +682,7 @@ News
 
 - **Results:** ``ResultSet.iterate`` is now pending deprecation.
 
-    The method will be deprecated in version 3.2 and removed in version 3.3.
+    The method will be removed in version 4.0 and removed in version 5.0.
 
     Use ``result.get(callback=)`` (or ``result.iter_native()`` where available)
     instead.
@@ -832,7 +832,7 @@ Synchronous subtasks
 
 Tasks waiting for the result of a subtask will now emit
 a :exc:`RuntimeWarning` warning when using the prefork pool,
-and in 3.2 this will result in an exception being raised.
+and in 4.0 this will result in an exception being raised.
 
 It's not legal for tasks to block by waiting for subtasks
 as this is likely to lead to resource starvation and eventually

+ 1 - 1
docs/includes/introduction.txt

@@ -1,4 +1,4 @@
-:Version: 3.2.0a1 (Cipater)
+:Version: 4.0.0a1 (0today8)
 :Web: http://celeryproject.org/
 :Download: http://pypi.python.org/pypi/celery/
 :Source: http://github.com/celery/celery/

+ 1 - 1
docs/index.rst

@@ -49,7 +49,7 @@ Contents
     tutorials/index
     faq
     changelog
-    whatsnew-3.2
+    whatsnew-4.0
     whatsnew-3.1
     whatsnew-3.0
     whatsnew-2.5

+ 3 - 3
docs/internals/deprecation.rst

@@ -7,14 +7,14 @@
 .. contents::
     :local:
 
-.. _deprecations-v3.2:
+.. _deprecations-v4.0:
 
-Removals for version 3.2
+Removals for version 4.0
 ========================
 
 - Module ``celery.task.trace`` has been renamed to ``celery.app.trace``
   as the ``celery.task`` package is being phased out.  The compat module
-  will be removed in version 3.2 so please change any import from::
+  will be removed in version 4.0 so please change any import from::
 
     from celery.task.trace import …
 

+ 1 - 1
docs/internals/protocol.rst

@@ -310,7 +310,7 @@ Event Messages
 Event messages are always JSON serialized and can contain arbitrary message
 body fields.
 
-Since version 3.2. the body can consist of either a single mapping (one event),
+Since version 4.0. the body can consist of either a single mapping (one event),
 or a list of mappings (multiple events).
 
 There are also standard fields that must always be present in an event

+ 2 - 2
docs/userguide/tasks.rst

@@ -224,7 +224,7 @@ on the automatic naming:
 Changing the automatic naming behavior
 --------------------------------------
 
-.. versionadded:: 3.2
+.. versionadded:: 4.0
 
 There are some cases when the default automatic naming is not suitable.
 Consider you have many tasks within many different modules::
@@ -503,7 +503,7 @@ override this default.
 Autoretrying
 ------------
 
-.. versionadded:: 3.2
+.. versionadded:: 4.0
 
 Sometimes you may want to retry a task on particular exception. To do so,
 you should wrap a task body with `try-except` statement, for example:

+ 4 - 4
docs/whatsnew-3.1.rst

@@ -73,7 +73,7 @@ these transports or donate resources to improve them, but  as the situation
 is now I don't think the quality is up to date with the rest of the code-base
 so I cannot recommend them for production use.
 
-The next version of Celery 3.2 will focus on performance and removing
+The next version of Celery 4.0 will focus on performance and removing
 rarely used parts of the library.  Work has also started on a new message
 protocol, supporting multiple languages and more.  The initial draft can
 be found :ref:`here <message-protocol-task-v2>`.
@@ -101,13 +101,13 @@ requiring the ``2to3`` porting tool.
 
 .. note::
 
-    This is also the last version to support Python 2.6! From Celery 3.2 and
+    This is also the last version to support Python 2.6! From Celery 4.0 and
     onwards Python 2.7 or later will be required.
 
 Last version to enable Pickle by default
 ----------------------------------------
 
-Starting from Celery 3.2 the default serializer will be json.
+Starting from Celery 4.0 the default serializer will be json.
 
 If you depend on pickle being accepted you should be prepared
 for this change by explicitly allowing your worker
@@ -138,7 +138,7 @@ Everyone should move to the new :program:`celery` umbrella
 command, so we are incrementally deprecating the old command names.
 
 In this version we've removed all commands that are not used
-in init scripts.  The rest will be removed in 3.2.
+in init scripts.  The rest will be removed in 4.0.
 
 +-------------------+--------------+-------------------------------------+
 | Program           | New Status   | Replacement                         |

+ 2 - 2
docs/whatsnew-3.2.rst → docs/whatsnew-4.0.rst

@@ -1,7 +1,7 @@
-.. _whatsnew-3.2:
+.. _whatsnew-4.0:
 
 ===========================================
- What's new in Celery 3.2 (TBA)
+ What's new in Celery 4.0 (TBA)
 ===========================================
 :Author: Ask Solem (ask at celeryproject.org)
 

+ 1 - 1
setup.py

@@ -11,7 +11,7 @@ import codecs
 CELERY_COMPAT_PROGRAMS = int(os.environ.get('CELERY_COMPAT_PROGRAMS', 1))
 
 if sys.version_info < (2, 7):
-    raise Exception('Celery 3.2 requires Python 2.7 or higher.')
+    raise Exception('Celery 4.0 requires Python 2.7 or higher.')
 
 # -*- Upgrading from older versions -*-