This document describes the current stable version of Celery (5.1). For development docs, go here.
This document contains change notes for bugfix releases in the 4.0.x series (latentcall), please see What’s new in Celery 4.0 (latentcall) for an overview of what’s new in Celery 4.0.
2016-12-15 03:40 PM PST
Now depends on Kombu 4.0.2.
Tasks: Fixed problem with JSON serialization of group (
keys must be stringerror, Issue #3688).
Worker: Fixed JSON serialization issue when using
inspect activeand friends (Issue #3667).
App: Fixed saferef errors when using signals (Issue #3670).
Prefork: Fixed bug with pack requiring bytes argument on Python 2.7.5 and earlier (Issue #3674).
Tasks: Saferepr did not handle unicode in bytestrings on Python 2 (Issue #3676).
Testing: Added new
Contributed by Michael Howitz.
Tasks: Added new
This makes the restore method behave the same way as the
Contributed by Andreas Pelme.
Tasks: Fixed type checking crash when task takes
*argson Python 3 (Issue #3678).
Documentation and examples improvements by:
2016-12-08 05:22 PM PST
[Security: CELERYSA-0003] Insecure default configuration
accept_contentsetting was set to allow deserialization of pickled messages in Celery 4.0.0.
The insecure default has been fixed in 4.0.1, and you can also configure the 4.0.0 version to explicitly only allow json serialized messages:
app.conf.accept_content = ['json']
Tasks: Added new method to register class-based tasks (Issue #3615).
To register a class based task you should now call
from celery import Celery, Task app = Celery() class CustomTask(Task): def run(self): return 'hello' app.register_task(CustomTask())
Tasks: Argument checking now supports keyword-only arguments on Python3 (Issue #3658).
Contributed by @sww.
task-sentevent was not being sent even if configured to do so (Issue #3646).
Worker: Fixed AMQP heartbeat support for eventlet/gevent pools (Issue #3649).
app.conf.humanize()would not work if configuration not finalized (Issue #3652).
safereprattempted to show iterables as lists and mappings as dicts.
safereprdid not handle unicode-errors when attempting to format
byteson Python 3 (Issue #3610).
safereprshould now properly represent byte strings with non-ascii characters (Issue #3600).
Results: Fixed bug in elasticsearch where _index method missed the body argument (Issue #3606).
Fix contributed by 何翔宇 (Sean Ho).
ValueErrorin chord with single task header (Issue #3608).
Fix contributed by Viktor Holmqvist.
Task: Ensure class-based task has name prior to registration (Issue #3616).
Fix contributed by Rick Wargo.
Beat: Fixed problem with strings in shelve (Issue #3644).
Fix contributed by Alli.
-Oargument set to something other than
Task: Retried tasks were no longer sent to the original queue (Issue #3622).
Worker: Python 3: Fixed None/int type comparison in
Results: Redis has a new
Results: Redis result backend passed the
socket_connect_timeoutargument to UNIX socket based connections by mistake, causing a crash.
Worker: Fixed missing logo in worker splash screen when running on Python 3.x (Issue #3627).
Fix contributed by Brian Luan.
celery[redis]bundle installation (Issue #3643).
Fix contributed by Rémi Marenco.
celery[sqs]now also requires pycurl (Issue #3619).
Worker: Hard time limits were no longer being respected (Issue #3618).
Worker: Soft time limit log showed
Truesinstead of the number of seconds.
registry_clsargument no longer had any effect (Issue #3613).
Worker: Event producer now uses
Results: Redis/memcache backends now uses
result_expiresto expire chord counter (Issue #3573).
Contributed by Tayfun Sen.
Django: Fixed command for upgrading settings with Django (Issue #3563).
Fix contributed by François Voron.
Testing: Added a
celery_parameterstest fixture to be able to use customized
Celeryinit parameters. (#3626)
Contributed by Steffen Allner.
Documentation improvements contributed by
2016-11-04 02:00 P.M PDT
See What’s new in Celery 4.0 (latentcall) (in
2016-11-02 01:30 P.M PDT
Database result backend related setting names changed from
sqlalchemy_named settings won’t work at all in this version so you need to rename them. This is a last minute change, and as they were not supported in 3.1 we will not be providing aliases.
chain(A, B, C)now works the same way as
A | B | C.
This means calling
chain()might not actually return a chain, it can return a group or any other type depending on how the workflow can be optimized.