| 1 |
.. _changelog-4.0: |
| 2 |
|
| 3 |
================ |
| 4 |
Change history |
| 5 |
================ |
| 6 |
|
| 7 |
This document contains change notes for bugfix releases in |
| 8 |
the 4.0.x series (latentcall), please see :ref:`whatsnew-4.0` for |
| 9 |
an overview of what's new in Celery 4.0. |
| 10 |
|
| 11 |
.. _version-4.0.2: |
| 12 |
|
| 13 |
4.0.2 |
| 14 |
===== |
| 15 |
:release-date: 2016-12-15 03:40 PM PST |
| 16 |
:release-by: Ask Solem |
| 17 |
|
| 18 |
- **Requirements** |
| 19 |
|
| 20 |
- Now depends on :ref:`Kombu 4.0.2 <kombu:version-4.0.2>`. |
| 21 |
|
| 22 |
- **Tasks**: Fixed problem with JSON serialization of `group` |
| 23 |
(``keys must be string`` error, Issue #3688). |
| 24 |
|
| 25 |
- **Worker**: Fixed JSON serialization issue when using ``inspect active`` |
| 26 |
and friends (Issue #3667). |
| 27 |
|
| 28 |
- **App**: Fixed saferef errors when using signals (Issue #3670). |
| 29 |
|
| 30 |
- **Prefork**: Fixed bug with pack requiring bytes argument |
| 31 |
on Python 2.7.5 and earlier (Issue #3674). |
| 32 |
|
| 33 |
- **Tasks**: Saferepr did not handle unicode in bytestrings on Python 2 |
| 34 |
(Issue #3676). |
| 35 |
|
| 36 |
- **Testing**: Added new ``celery_worker_paremeters`` fixture. |
| 37 |
|
| 38 |
Contributed by **Michael Howitz**. |
| 39 |
|
| 40 |
- **Tasks**: Added new ``app`` argument to ``GroupResult.restore`` |
| 41 |
(Issue #3669). |
| 42 |
|
| 43 |
This makes the restore method behave the same way as the ``GroupResult`` |
| 44 |
constructor. |
| 45 |
|
| 46 |
Contributed by **Andreas Pelme**. |
| 47 |
|
| 48 |
- **Tasks**: Fixed type checking crash when task takes ``*args`` on Python 3 |
| 49 |
(Issue #3678). |
| 50 |
|
| 51 |
- Documentation and examples improvements by: |
| 52 |
|
| 53 |
- **BLAGA Razvan-Paul** |
| 54 |
- **Michael Howitz** |
| 55 |
- :github_user:`paradox41` |
| 56 |
|
| 57 |
.. _version-4.0.1: |
| 58 |
|
| 59 |
4.0.1 |
| 60 |
===== |
| 61 |
:release-date: 2016-12-08 05:22 PM PST |
| 62 |
:release-by: Ask Solem |
| 63 |
|
| 64 |
* [Security: `CELERYSA-0003`_] Insecure default configuration |
| 65 |
|
| 66 |
The default :setting:`accept_content` setting was set to allow |
| 67 |
deserialization of pickled messages in Celery 4.0.0. |
| 68 |
|
| 69 |
The insecure default has been fixed in 4.0.1, and you can also |
| 70 |
configure the 4.0.0 version to explicitly only allow json serialized |
| 71 |
messages: |
| 72 |
|
| 73 |
.. code-block:: python |
| 74 |
|
| 75 |
app.conf.accept_content = ['json'] |
| 76 |
|
| 77 |
.. _`CELERYSA-0003`: |
| 78 |
https://github.com/celery/celery/tree/master/docs/sec/CELERYSA-0003.txt |
| 79 |
|
| 80 |
- **Tasks**: Added new method to register class-based tasks (Issue #3615). |
| 81 |
|
| 82 |
To register a class based task you should now call ``app.register_task``: |
| 83 |
|
| 84 |
.. code-block:: python |
| 85 |
|
| 86 |
from celery import Celery, Task |
| 87 |
|
| 88 |
app = Celery() |
| 89 |
|
| 90 |
class CustomTask(Task): |
| 91 |
|
| 92 |
def run(self): |
| 93 |
return 'hello' |
| 94 |
|
| 95 |
app.register_task(CustomTask()) |
| 96 |
|
| 97 |
- **Tasks**: Argument checking now supports keyword-only arguments on Python3 |
| 98 |
(Issue #3658). |
| 99 |
|
| 100 |
Contributed by :github_user:`sww`. |
| 101 |
|
| 102 |
- **Tasks**: The ``task-sent`` event was not being sent even if |
| 103 |
configured to do so (Issue #3646). |
| 104 |
|
| 105 |
- **Worker**: Fixed AMQP heartbeat support for eventlet/gevent pools |
| 106 |
(Issue #3649). |
| 107 |
|
| 108 |
- **App**: ``app.conf.humanize()`` would not work if configuration |
| 109 |
not finalized (Issue #3652). |
| 110 |
|
| 111 |
- **Utils**: ``saferepr`` attempted to show iterables as lists |
| 112 |
and mappings as dicts. |
| 113 |
|
| 114 |
- **Utils**: ``saferepr`` did not handle unicode-errors |
| 115 |
when attempting to format ``bytes`` on Python 3 (Issue #3610). |
| 116 |
|
| 117 |
- **Utils**: ``saferepr`` should now properly represent byte strings |
| 118 |
with non-ascii characters (Issue #3600). |
| 119 |
|
| 120 |
- **Results**: Fixed bug in elasticsearch where _index method missed |
| 121 |
the body argument (Issue #3606). |
| 122 |
|
| 123 |
Fix contributed by **何翔宇** (Sean Ho). |
| 124 |
|
| 125 |
- **Canvas**: Fixed :exc:`ValueError` in chord with single task header |
| 126 |
(Issue #3608). |
| 127 |
|
| 128 |
Fix contributed by **Viktor Holmqvist**. |
| 129 |
|
| 130 |
- **Task**: Ensure class-based task has name prior to registration |
| 131 |
(Issue #3616). |
| 132 |
|
| 133 |
Fix contributed by **Rick Wargo**. |
| 134 |
|
| 135 |
- **Beat**: Fixed problem with strings in shelve (Issue #3644). |
| 136 |
|
| 137 |
Fix contributed by **Alli**. |
| 138 |
|
| 139 |
- **Worker**: Fixed :exc:`KeyError` in ``inspect stats`` when ``-O`` argument |
| 140 |
set to something other than ``fast`` or ``fair`` (Issue #3621). |
| 141 |
|
| 142 |
- **Task**: Retried tasks were no longer sent to the original queue |
| 143 |
(Issue #3622). |
| 144 |
|
| 145 |
- **Worker**: Python 3: Fixed None/int type comparison in |
| 146 |
:file:`apps/worker.py` (Issue #3631). |
| 147 |
|
| 148 |
- **Results**: Redis has a new :setting:`redis_socket_connect_timeout` |
| 149 |
setting. |
| 150 |
|
| 151 |
- **Results**: Redis result backend passed the ``socket_connect_timeout`` |
| 152 |
argument to UNIX socket based connections by mistake, causing a crash. |
| 153 |
|
| 154 |
- **Worker**: Fixed missing logo in worker splash screen when running on |
| 155 |
Python 3.x (Issue #3627). |
| 156 |
|
| 157 |
Fix contributed by **Brian Luan**. |
| 158 |
|
| 159 |
- **Deps**: Fixed ``celery[redis]`` bundle installation (Issue #3643). |
| 160 |
|
| 161 |
Fix contributed by **Rémi Marenco**. |
| 162 |
|
| 163 |
- **Deps**: Bundle ``celery[sqs]`` now also requires :pypi:`pycurl` |
| 164 |
(Issue #3619). |
| 165 |
|
| 166 |
- **Worker**: Hard time limits were no longer being respected (Issue #3618). |
| 167 |
|
| 168 |
- **Worker**: Soft time limit log showed ``Trues`` instead of the number |
| 169 |
of seconds. |
| 170 |
|
| 171 |
- **App**: ``registry_cls`` argument no longer had any effect (Issue #3613). |
| 172 |
|
| 173 |
- **Worker**: Event producer now uses ``connection_for_Write`` (Issue #3525). |
| 174 |
|
| 175 |
- **Results**: Redis/memcache backends now uses :setting:`result_expires` |
| 176 |
to expire chord counter (Issue #3573). |
| 177 |
|
| 178 |
Contributed by **Tayfun Sen**. |
| 179 |
|
| 180 |
- **Django**: Fixed command for upgrading settings with Django (Issue #3563). |
| 181 |
|
| 182 |
Fix contributed by **François Voron**. |
| 183 |
|
| 184 |
- **Testing**: Added a ``celery_parameters`` test fixture to be able to use |
| 185 |
customized ``Celery`` init parameters. (#3626) |
| 186 |
|
| 187 |
Contributed by **Steffen Allner**. |
| 188 |
|
| 189 |
- Documentation improvements contributed by |
| 190 |
|
| 191 |
- :github_user:`csfeathers` |
| 192 |
- **Moussa Taifi** |
| 193 |
- **Yuhannaa** |
| 194 |
- **Laurent Peuch** |
| 195 |
- **Christian** |
| 196 |
- **Bruno Alla** |
| 197 |
- **Steven Johns** |
| 198 |
- :github_user:`tnir` |
| 199 |
- **GDR!** |
| 200 |
|
| 201 |
.. _version-4.0.0: |
| 202 |
|
| 203 |
4.0.0 |
| 204 |
===== |
| 205 |
:release-date: 2016-11-04 02:00 P.M PDT |
| 206 |
:release-by: Ask Solem |
| 207 |
|
| 208 |
See :ref:`whatsnew-4.0` (in :file:`docs/whatsnew-4.0.rst`). |
| 209 |
|
| 210 |
.. _version-4.0.0rc7: |
| 211 |
|
| 212 |
4.0.0rc7 |
| 213 |
======== |
| 214 |
:release-date: 2016-11-02 01:30 P.M PDT |
| 215 |
|
| 216 |
Important notes |
| 217 |
--------------- |
| 218 |
|
| 219 |
- Database result backend related setting names changed from |
| 220 |
``sqlalchemy_*`` -> ``database_*``. |
| 221 |
|
| 222 |
The ``sqlalchemy_`` named settings won't work at all in this |
| 223 |
version so you need to rename them. This is a last minute change, |
| 224 |
and as they were not supported in 3.1 we will not be providing |
| 225 |
aliases. |
| 226 |
|
| 227 |
- ``chain(A, B, C)`` now works the same way as ``A | B | C``. |
| 228 |
|
| 229 |
This means calling ``chain()`` might not actually return a chain, |
| 230 |
it can return a group or any other type depending on how the |
| 231 |
workflow can be optimized. |