Debian Codegraph @

docs/history/changelog-4.3.rst

raw
1 .. _changelog-4.3:
2
3 ================
4 Change history
5 ================
6
7 This document contains change notes for bugfix releases in
8 the 4.3.x series, please see :ref:`whatsnew-4.3` for
9 an overview of what's new in Celery 4.3.
10
11 4.3.1
12 =====
13
14 :release-date: 2020-09-10 1:00 P.M UTC+3:00
15 :release-by: Omer Katz
16
17 - Limit vine version to be below 5.0.0.
18
19 Contributed by **Omer Katz**
20
21 4.3.0
22 =====
23 :release-date: 2019-03-31 7:00 P.M UTC+3:00
24 :release-by: Omer Katz
25
26 - Added support for broadcasting using a regular expression pattern
27 or a glob pattern to multiple Pidboxes.
28
29 This allows you to inspect or ping multiple workers at once.
30
31 Contributed by **Dmitry Malinovsky** & **Jason Held**
32
33 - Added support for PEP 420 namespace packages.
34
35 This allows you to load tasks from namespace packages.
36
37 Contributed by **Colin Watson**
38
39 - Added :setting:`acks_on_failure_or_timeout` as a setting instead of
40 a task only option.
41
42 This was missing from the original PR but now added for completeness.
43
44 Contributed by **Omer Katz**
45
46 - Added the :signal:`task_received` signal.
47
48 Contributed by **Omer Katz**
49
50 - Fixed a crash of our CLI that occurred for everyone using Python < 3.6.
51
52 The crash was introduced in `acd6025 <https://github.com/celery/celery/commit/acd6025b7dc4db112a31020686fc8b15e1722c67>`_
53 by using the :class:`ModuleNotFoundError` exception which was introduced
54 in Python 3.6.
55
56 Contributed by **Omer Katz**
57
58 - Fixed a crash that occurred when using the Redis result backend
59 while the :setting:`result_expires` is set to None.
60
61 Contributed by **Toni Ruža** & **Omer Katz**
62
63 - Added support the `DNS seedlist connection format <https://docs.mongodb.com/manual/reference/connection-string/#dns-seedlist-connection-format>`_
64 for the MongoDB result backend.
65
66 This requires the `dnspython` package which will be installed by default
67 when installing the dependencies for the MongoDB result backend.
68
69 Contributed by **George Psarakis**
70
71 - Bump the minimum eventlet version to 0.24.1.
72
73 Contributed by **George Psarakis**
74
75 - Replace the `msgpack-python` package with `msgpack`.
76
77 We're no longer using the deprecated package.
78 See our :ref:`important notes <v430-important>` for this release
79 for further details on how to upgrade.
80
81 Contributed by **Daniel Hahler**
82
83 - Allow scheduling error handlers which are not registered tasks in the current
84 worker.
85
86 These kind of error handlers are now possible:
87
88 .. code-block:: python
89
90 from celery import Signature
91 Signature(
92 'bar', args=['foo'],
93 link_error=Signature('msg.err', queue='msg')
94 ).apply_async()
95
96 - Additional fixes and enhancements to the SSL support of
97 the Redis broker and result backend.
98
99 Contributed by **Jeremy Cohen**
100
101 Code Cleanups, Test Coverage & CI Improvements by:
102
103 - **Omer Katz**
104 - **Florian Chardin**
105
106 Documentation Fixes by:
107
108 - **Omer Katz**
109 - **Samuel Huang**
110 - **Amir Hossein Saeid Mehr**
111 - **Dmytro Litvinov**
112
113 4.3.0 RC2
114 =========
115 :release-date: 2019-03-03 9:30 P.M UTC+2:00
116 :release-by: Omer Katz
117
118 - **Filesystem Backend**: Added meaningful error messages for filesystem backend.
119
120 Contributed by **Lars Rinn**
121
122 - **New Result Backend**: Added the ArangoDB backend.
123
124 Contributed by **Dilip Vamsi Moturi**
125
126 - **Django**: Prepend current working directory instead of appending so that
127 the project directory will have precedence over system modules as expected.
128
129 Contributed by **Antonin Delpeuch**
130
131 - Bump minimum py-redis version to 3.2.0.
132
133 Due to multiple bugs in earlier versions of py-redis that were causing
134 issues for Celery, we were forced to bump the minimum required version to 3.2.0.
135
136 Contributed by **Omer Katz**
137
138 - **Dependencies**: Bump minimum required version of Kombu to 4.4
139
140 Contributed by **Omer Katz**
141
142 4.3.0 RC1
143 =========
144 :release-date: 2019-02-20 5:00 PM IST
145 :release-by: Omer Katz
146
147 - **Canvas**: :meth:`celery.chain.apply` does not ignore keyword arguments anymore when
148 applying the chain.
149
150 Contributed by **Korijn van Golen**
151
152 - **Result Set**: Don't attempt to cache results in a :class:`celery.result.ResultSet`.
153
154 During a join, the results cache was populated using :meth:`celery.result.ResultSet.get`, if one of the results
155 contains an exception, joining unexpectedly failed.
156
157 The results cache is now removed.
158
159 Contributed by **Derek Harland**
160
161 - **Application**: :meth:`celery.Celery.autodiscover_tasks` now attempts to import the package itself
162 when the `related_name` keyword argument is `None`.
163
164 Contributed by **Alex Ioannidis**
165
166 - **Windows Support**: On Windows 10, stale PID files prevented celery beat to run.
167 We now remove them when a :class:`SystemExit` is raised.
168
169 Contributed by **:github_user:`na387`**
170
171 - **Task**: Added the new :setting:`task_acks_on_failure_or_timeout` setting.
172
173 Acknowledging SQS messages on failure or timing out makes it impossible to use
174 dead letter queues.
175
176 We introduce the new option acks_on_failure_or_timeout,
177 to ensure we can totally fallback on native SQS message lifecycle,
178 using redeliveries for retries (in case of slow processing or failure)
179 and transitions to dead letter queue after defined number of times.
180
181 Contributed by **Mario Kostelac**
182
183 - **RabbitMQ Broker**: Adjust HA headers to work on RabbitMQ 3.x.
184
185 This change also means we're ending official support for RabbitMQ 2.x.
186
187 Contributed by **Asif Saif Uddin**
188
189 - **Command Line**: Improve :program:`celery update` error handling.
190
191 Contributed by **Federico Bond**
192
193 - **Canvas**: Support chords with :setting:`task_always_eager` set to `True`.
194
195 Contributed by **Axel Haustant**
196
197 - **Result Backend**: Optionally store task properties in result backend.
198
199 Setting the :setting:`result_extended` configuration option to `True` enables
200 storing additional task properties in the result backend.
201
202 Contributed by **John Arnold**
203
204 - **Couchbase Result Backend**: Allow the Couchbase result backend to
205 automatically detect the serialization format.
206
207 Contributed by **Douglas Rohde**
208
209 - **New Result Backend**: Added the Azure Block Blob Storage result backend.
210
211 The backend is implemented on top of the azure-storage library which
212 uses Azure Blob Storage for a scalable low-cost PaaS backend.
213
214 The backend was load tested via a simple nginx/gunicorn/sanic app hosted
215 on a DS4 virtual machine (4 vCores, 16 GB RAM) and was able to handle
216 600+ concurrent users at ~170 RPS.
217
218 The commit also contains a live end-to-end test to facilitate
219 verification of the backend functionality. The test is activated by
220 setting the `AZUREBLOCKBLOB_URL` environment variable to
221 `azureblockblob://{ConnectionString}` where the value for
222 `ConnectionString` can be found in the `Access Keys` pane of a Storage
223 Account resources in the Azure Portal.
224
225 Contributed by **Clemens Wolff**
226
227 - **Task**: :meth:`celery.app.task.update_state` now accepts keyword arguments.
228
229 This allows passing extra fields to the result backend.
230 These fields are unused by default but custom result backends can use them
231 to determine how to store results.
232
233 Contributed by **Christopher Dignam**
234
235 - Gracefully handle consumer :class:`kombu.exceptions.DecodeError`.
236
237 When using the v2 protocol the worker no longer crashes when the consumer
238 encounters an error while decoding a message.
239
240 Contributed by **Steven Sklar**
241
242 - **Deployment**: Fix init.d service stop.
243
244 Contributed by **Marcus McHale**
245
246 - **Django**: Drop support for Django < 1.11.
247
248 Contributed by **Asif Saif Uddin**
249
250 - **Django**: Remove old djcelery loader.
251
252 Contributed by **Asif Saif Uddin**
253
254 - **Result Backend**: :class:`celery.worker.request.Request` now passes
255 :class:`celery.app.task.Context` to the backend's store_result functions.
256
257 Since the class currently passes `self` to these functions,
258 revoking a task resulted in corrupted task result data when
259 django-celery-results was used.
260
261 Contributed by **Kiyohiro Yamaguchi**
262
263 - **Worker**: Retry if the heartbeat connection dies.
264
265 Previously, we keep trying to write to the broken connection.
266 This results in a memory leak because the event dispatcher will keep appending
267 the message to the outbound buffer.
268
269 Contributed by **Raf Geens**
270
271 - **Celery Beat**: Handle microseconds when scheduling.
272
273 Contributed by **K Davis**
274
275 - **Asynpool**: Fixed deadlock when closing socket.
276
277 Upon attempting to close a socket, :class:`celery.concurrency.asynpool.AsynPool`
278 only removed the queue writer from the hub but did not remove the reader.
279 This led to a deadlock on the file descriptor
280 and eventually the worker stopped accepting new tasks.
281
282 We now close both the reader and the writer file descriptors in a single loop
283 iteration which prevents the deadlock.
284
285 Contributed by **Joshua Engelman**
286
287 - **Celery Beat**: Correctly consider timezone when calculating timestamp.
288
289 Contributed by **:github_user:`yywing`**
290
291 - **Celery Beat**: :meth:`celery.beat.Scheduler.schedules_equal` can now handle
292 either arguments being a `None` value.
293
294 Contributed by **:github_user:` ratson`**
295
296 - **Documentation/Sphinx**: Fixed Sphinx support for shared_task decorated functions.
297
298 Contributed by **Jon Banafato**
299
300 - **New Result Backend**: Added the CosmosDB result backend.
301
302 This change adds a new results backend.
303 The backend is implemented on top of the pydocumentdb library which uses
304 Azure CosmosDB for a scalable, globally replicated, high-performance,
305 low-latency and high-throughput PaaS backend.
306
307 Contributed by **Clemens Wolff**
308
309 - **Application**: Added configuration options to allow separate multiple apps
310 to run on a single RabbitMQ vhost.
311
312 The newly added :setting:`event_exchange` and :setting:`control_exchange`
313 configuration options allow users to use separate Pidbox exchange
314 and a separate events exchange.
315
316 This allow different Celery applications to run separately on the same vhost.
317
318 Contributed by **Artem Vasilyev**
319
320 - **Result Backend**: Forget parent result metadata when forgetting
321 a result.
322
323 Contributed by **:github_user:`tothegump`**
324
325 - **Task** Store task arguments inside :class:`celery.exceptions.MaxRetriesExceededError`.
326
327 Contributed by **Anthony Ruhier**
328
329 - **Result Backend**: Added the :setting:`result_accept_content` setting.
330
331 This feature allows to configure different accepted content for the result
332 backend.
333
334 A special serializer (`auth`) is used for signed messaging,
335 however the result_serializer remains in json, because we don't want encrypted
336 content in our result backend.
337
338 To accept unsigned content from the result backend,
339 we introduced this new configuration option to specify the
340 accepted content from the backend.
341
342 - **Canvas**: Fixed error callback processing for class based tasks.
343
344 Contributed by **Victor Mireyev**
345
346 - **New Result Backend**: Added the S3 result backend.
347
348 Contributed by **Florian Chardin**
349
350 - **Task**: Added support for Cythonized Celery tasks.
351
352 Contributed by **Andrey Skabelin**
353
354 - **Riak Result Backend**: Warn Riak backend users for possible Python 3.7 incompatibilities.
355
356 Contributed by **George Psarakis**
357
358 - **Python Runtime**: Added Python 3.7 support.
359
360 Contributed by **Omer Katz** & **Asif Saif Uddin**
361
362 - **Auth Serializer**: Revamped the auth serializer.
363
364 The auth serializer received a complete overhaul.
365 It was previously horribly broken.
366
367 We now depend on cryptography instead of pyOpenSSL for this serializer.
368
369 - **Command Line**: :program:`celery report` now reports kernel version along
370 with other platform details.
371
372 Contributed by **Omer Katz**
373
374 - **Canvas**: Fixed chords with chains which include sub chords in a group.
375
376 Celery now correctly executes the last task in these types of canvases:
377
378 .. code-block:: python
379
380 c = chord(
381 group([
382 chain(
383 dummy.si(),
384 chord(
385 group([dummy.si(), dummy.si()]),
386 dummy.si(),
387 ),
388 ),
389 chain(
390 dummy.si(),
391 chord(
392 group([dummy.si(), dummy.si()]),
393 dummy.si(),
394 ),
395 ),
396 ]),
397 dummy.si()
398 )
399
400 c.delay().get()
401
402 Contributed by **Maximilien Cuony**
403
404 - **Canvas**: Complex canvases with error callbacks no longer raises an :class:`AttributeError`.
405
406 Very complex canvases such as `this <https://github.com/merchise/xopgi.base/blob/6634819ad5c701c04bc9baa5c527449070843b71/xopgi/xopgi_cdr/cdr_agent.py#L181>`_
407 no longer raise an :class:`AttributeError` which prevents constructing them.
408
409 We do not know why this bug occurs yet.
410
411 Contributed by **Manuel Vázquez Acosta**
412
413 - **Command Line**: Added proper error messages in cases where app cannot be loaded.
414
415 Previously, celery crashed with an exception.
416
417 We now print a proper error message.
418
419 Contributed by **Omer Katz**
420
421 - **Task**: Added the :setting:`task_default_priority` setting.
422
423 You can now set the default priority of a task using
424 the :setting:`task_default_priority` setting.
425 The setting's value will be used if no priority is provided for a specific
426 task.
427
428 Contributed by **:github_user:`madprogrammer`**
429
430 - **Dependencies**: Bump minimum required version of Kombu to 4.3
431 and Billiard to 3.6.
432
433 Contributed by **Asif Saif Uddin**
434
435 - **Result Backend**: Fix memory leak.
436
437 We reintroduced weak references to bound methods for AsyncResult callback promises,
438 after adding full weakref support for Python 2 in `vine <https://github.com/celery/vine/tree/v1.2.0>`_.
439 More details can be found in `celery/celery#4839 <https://github.com/celery/celery/pull/4839>`_.
440
441 Contributed by **George Psarakis** and **:github_user:`monsterxx03`**.
442
443 - **Task Execution**: Fixed roundtrip serialization for eager tasks.
444
445 When doing the roundtrip serialization for eager tasks,
446 the task serializer will always be JSON unless the `serializer` argument
447 is present in the call to :meth:`celery.app.task.Task.apply_async`.
448 If the serializer argument is present but is `'pickle'`,
449 an exception will be raised as pickle-serialized objects
450 cannot be deserialized without specifying to `serialization.loads`
451 what content types should be accepted.
452 The Producer's `serializer` seems to be set to `None`,
453 causing the default to JSON serialization.
454
455 We now continue to use (in order) the `serializer` argument to :meth:`celery.app.task.Task.apply_async`,
456 if present, or the `Producer`'s serializer if not `None`.
457 If the `Producer`'s serializer is `None`,
458 it will use the Celery app's `task_serializer` configuration entry as the serializer.
459
460 Contributed by **Brett Jackson**
461
462 - **Redis Result Backend**: The :class:`celery.backends.redis.ResultConsumer` class no longer assumes
463 :meth:`celery.backends.redis.ResultConsumer.start` to be called before
464 :meth:`celery.backends.redis.ResultConsumer.drain_events`.
465
466 This fixes a race condition when using the Gevent workers pool.
467
468 Contributed by **Noam Kush**
469
470 - **Task**: Added the :setting:`task_inherit_parent_priority` setting.
471
472 Setting the :setting:`task_inherit_parent_priority` configuration option to
473 `True` will make Celery tasks inherit the priority of the previous task
474 linked to it.
475
476 Examples:
477
478 .. code-block:: python
479
480 c = celery.chain(
481 add.s(2), # priority=None
482 add.s(3).set(priority=5), # priority=5
483 add.s(4), # priority=5
484 add.s(5).set(priority=3), # priority=3
485 add.s(6), # priority=3
486 )
487
488 .. code-block:: python
489
490 @app.task(bind=True)
491 def child_task(self):
492 pass
493
494 @app.task(bind=True)
495 def parent_task(self):
496 child_task.delay()
497
498 # child_task will also have priority=5
499 parent_task.apply_async(args=[], priority=5)
500
501 Contributed by **:github_user:`madprogrammer`**
502
503 - **Canvas**: Added the :setting:`result_chord_join_timeout` setting.
504
505 Previously, :meth:`celery.result.GroupResult.join` had a fixed timeout of 3
506 seconds.
507
508 The :setting:`result_chord_join_timeout` setting now allows you to change it.
509
510 Contributed by **:github_user:`srafehi`**
511
512 Code Cleanups, Test Coverage & CI Improvements by:
513
514 - **Jon Dufresne**
515 - **Asif Saif Uddin**
516 - **Omer Katz**
517 - **Brett Jackson**
518 - **Bruno Alla**
519 - **:github_user:`tothegump`**
520 - **Bojan Jovanovic**
521 - **Florian Chardin**
522 - **:github_user:`walterqian`**
523 - **Fabian Becker**
524 - **Lars Rinn**
525 - **:github_user:`madprogrammer`**
526 - **Ciaran Courtney**
527
528 Documentation Fixes by:
529
530 - **Lewis M. Kabui**
531 - **Dash Winterson**
532 - **Shanavas M**
533 - **Brett Randall**
534 - **Przemysław Suliga**
535 - **Joshua Schmid**
536 - **Asif Saif Uddin**
537 - **Xiaodong**
538 - **Vikas Prasad**
539 - **Jamie Alessio**
540 - **Lars Kruse**
541 - **Guilherme Caminha**
542 - **Andrea Rabbaglietti**
543 - **Itay Bittan**
544 - **Noah Hall**
545 - **Peng Weikang**
546 - **Mariatta Wijaya**
547 - **Ed Morley**
548 - **Paweł Adamczak**
549 - **:github_user:`CoffeeExpress`**
550 - **:github_user:`aviadatsnyk`**
551 - **Brian Schrader**
552 - **Josue Balandrano Coronel**
553 - **Tom Clancy**
554 - **Sebastian Wojciechowski**
555 - **Meysam Azad**
556 - **Willem Thiart**
557 - **Charles Chan**
558 - **Omer Katz**
559 - **Milind Shakya**