.. _whatsnew-4.2: =========================================== What's new in Celery 4.2 (windowlicker) =========================================== :Author: Omer Katz (``omer.drow at gmail.com``) .. sidebar:: Change history What's new documents describe the changes in major versions, we also have a :ref:`changelog` that lists the changes in bugfix releases (0.0.x), while older series are archived under the :ref:`history` section. Celery is a simple, flexible, and reliable distributed system to process vast amounts of messages, while providing operations with the tools required to maintain such a system. It's a task queue with focus on real-time processing, while also supporting task scheduling. Celery has a large and diverse community of users and contributors, you should come join us :ref:`on IRC ` or :ref:`our mailing-list `. To read more about Celery you should go read the :ref:`introduction `. While this version is backward compatible with previous versions it's important that you read the following section. This version is officially supported on CPython 2.7, 3.4, 3.5 & 3.6 and is also supported on PyPy. .. _`website`: http://celeryproject.org/ .. topic:: Table of Contents Make sure you read the important notes before upgrading to this version. .. contents:: :local: :depth: 2 Preface ======= The 4.2.0 release continues to improve our efforts to provide you with the best task execution platform for Python. This release is mainly a bug fix release, ironing out some issues and regressions found in Celery 4.0.0. Traditionally, releases were named after `Autechre `_'s track names. This release continues this tradition in a slightly different way. Each major version of Celery will use a different artist's track names as codenames. From now on, the 4.x series will be codenamed after `Aphex Twin `_'s track names. This release is codenamed after his very famous track, `Windowlicker `_. Thank you for your support! *— Omer Katz* Wall of Contributors -------------------- Alejandro Varas Alex Garel Alex Hill Alex Zaitsev Alexander Ovechkin Andrew Wong Anton Anton Gladkov Armenak Baburyan Asif Saifuddin Auvi BR Ben Welsh Bohdan Rybak Chris Mitchell DDevine Dan Wilson David Baumgold David Davis Denis Podlesniy Denis Shirokov Fengyuan Chen GDR! Geoffrey Bauduin George Psarakis Harry Moreno Huang Huang Igor Kasianov JJ Jackie Leng James M. Allen Javier Martin Montull John Arnold Jon Dufresne Jozef Kevin Gu Kxrr Leo Singer Mads Jensen Manuel Vázquez Acosta Marcelo Da Cruz Pinto Marco Schweighauser Markus Kaiserswerth Matt Davis Michael Michael Peake Mikołaj Misha Wolfson Nick Eaket <4418194+neaket360pi@users.noreply.github.com> Nicolas Mota Nicholas Pilon Omer Katz Patrick Cloke Patrick Zhang Paulo Rachel Johnson Raphaël Riel Russell Keith-Magee Ryan Guest Ryan P Kilby Régis B Sammie S. Taunton Samuel Dion-Girardeau Scott Cooper Sergi Almacellas Abellana Sergio Fernandez Shitikanth Theodore Dubois Thijs Triemstra Tobias Kunze Vincent Barbaresi Vinod Chandru Wido den Hollander Xavier Hardy anentropic arpanshah29 dmollerm hclihn <23141651+hclihn@users.noreply.github.com> jess lead2gold mariia-zelenova <32500603+mariia-zelenova@users.noreply.github.com> martialp mperice pachewise partizan y0ngdi <36658095+y0ngdi@users.noreply.github.com> .. note:: This wall was automatically generated from git history, so sadly it doesn't not include the people who help with more important things like answering mailing-list questions. .. _v420-important: Important Notes =============== Supported Python Versions ------------------------- The supported Python Versions are: - CPython 2.7 - CPython 3.4 - CPython 3.5 - CPython 3.6 - PyPy 5.8 (``pypy2``) .. _v420-news: News ==== Result Backends --------------- New Redis Sentinel Results Backend ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Redis Sentinel provides high availability for Redis. A new result backend supporting it was added. Cassandra Results Backend ~~~~~~~~~~~~~~~~~~~~~~~~~ A new `cassandra_options` configuration option was introduced in order to configure the cassandra client. See :ref:`conf-cassandra-result-backend` for more information. DynamoDB Results Backend ~~~~~~~~~~~~~~~~~~~~~~~~ A new `dynamodb_endpoint_url` configuration option was introduced in order to point the result backend to a local endpoint during development or testing. See :ref:`conf-dynamodb-result-backend` for more information. Python 2/3 Compatibility Fixes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Both the CouchDB and the Consul result backends accepted byte strings without decoding them to Unicode first. This is now no longer the case. Canvas ------ Multiple bugs were resolved resulting in a much smoother experience when using Canvas. Tasks ----- Bound Tasks as Error Callbacks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We fixed a regression that occured when bound tasks are used as error callbacks. This used to work in Celery 3.x but raised an exception in 4.x until this release. In both 4.0 and 4.1 the following code wouldn't work: .. code-block:: python @app.task(name="raise_exception", bind=True) def raise_exception(self): raise Exception("Bad things happened") @app.task(name="handle_task_exception", bind=True) def handle_task_exception(self): print("Exception detected") subtask = raise_exception.subtask() subtask.apply_async(link_error=handle_task_exception.s()) Task Representation ~~~~~~~~~~~~~~~~~~~ - Shadowing task names now works as expected. The shadowed name is properly presented in flower, the logs and the traces. - `argsrepr` and `kwargsrepr` were previously not used even if specified. They now work as expected. See :ref:`task-hiding-sensitive-information` for more information. Custom Requests ~~~~~~~~~~~~~~~ We now allow tasks to use custom `request `:class: classes for custom task classes. See :ref:`task-requests-and-custom-requests` for more information. Retries with Exponential Backoff ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retries can now be performed with exponential backoffs to avoid overwhelming external services with requests. See :ref:`task-autoretry` for more information. Sphinx Extension ---------------- Tasks were supposed to be automatically documented when using Sphinx's Autodoc was used. The code that would have allowed automatic documentation had a few bugs which are now fixed. Also, The extension is now documented properly. See :ref:`sphinx` for more information.