Debian Codegraph @

docs/history/whatsnew-5.4.rst

raw
1 .. _whatsnew-5.4:
2
3 =========================================
4 What's new in Celery 5.4 (Opalescent)
5 =========================================
6 :Author: Tomer Nosrati (``tomer.nosrati at gmail.com``).
7
8 .. sidebar:: Change history
9
10 What's new documents describe the changes in major versions,
11 we also have a :ref:`changelog` that lists the changes in bugfix
12 releases (0.0.x), while older series are archived under the :ref:`history`
13 section.
14
15 Celery is a simple, flexible, and reliable distributed programming framework
16 to process vast amounts of messages, while providing operations with
17 the tools required to maintain a distributed system with python.
18
19 It's a task queue with focus on real-time processing, while also
20 supporting task scheduling.
21
22 Celery has a large and diverse community of users and contributors,
23 you should come join us :ref:`on IRC <irc-channel>`
24 or :ref:`our mailing-list <mailing-list>`.
25
26 .. note::
27
28 Following the problems with Freenode, we migrated our IRC channel to Libera Chat
29 as most projects did.
30 You can also join us using `Gitter <https://gitter.im/celery/celery>`_.
31
32 We're sometimes there to answer questions. We welcome you to join.
33
34 To read more about Celery you should go read the :ref:`introduction <intro>`.
35
36 While this version is **mostly** backward compatible with previous versions
37 it's important that you read the following section as this release
38 is a new major version.
39
40 This version is officially supported on CPython 3.8, 3.9 & 3.10
41 and is also supported on PyPy3.8+.
42
43 .. _`website`: https://docs.celeryq.dev/en/stable/
44
45 .. topic:: Table of Contents
46
47 Make sure you read the important notes before upgrading to this version.
48
49 .. contents::
50 :local:
51 :depth: 2
52
53 Preface
54 =======
55
56 .. note::
57
58 **This release contains fixes for many long standing bugs & stability issues.
59 We encourage our users to upgrade to this release as soon as possible.**
60
61 The 5.4.0 release is a new feature release for Celery.
62
63 Releases in the 5.x series are codenamed after songs of `Jon Hopkins <https://en.wikipedia.org/wiki/Jon_Hopkins>`_.
64 This release has been codenamed `Opalescent <https://www.youtube.com/watch?v=9ByfK25WsMM>`_.
65
66 From now on we only support Python 3.8 and above.
67 We will maintain compatibility with Python 3.8 until it's
68 EOL in 2024.
69
70 *— Tomer Nosrati*
71
72 Long Term Support Policy
73 ------------------------
74
75 We no longer support Celery 4.x as we don't have the resources to do so.
76 If you'd like to help us, all contributions are welcome.
77
78 Celery 5.x **is not** an LTS release. We will support it until the release
79 of Celery 6.x.
80
81 We're in the process of defining our Long Term Support policy.
82 Watch the next "What's New" document for updates.
83
84 Wall of Contributors
85 --------------------
86
87 .. note::
88
89 This wall was automatically generated from git history,
90 so sadly it doesn't not include the people who help with more important
91 things like answering mailing-list questions.
92
93 Upgrading from Celery 4.x
94 =========================
95
96 Step 1: Adjust your command line invocation
97 -------------------------------------------
98
99 Celery 5.0 introduces a new CLI implementation which isn't completely backwards compatible.
100
101 The global options can no longer be positioned after the sub-command.
102 Instead, they must be positioned as an option for the `celery` command like so::
103
104 celery --app path.to.app worker
105
106 If you were using our :ref:`daemonizing` guide to deploy Celery in production,
107 you should revisit it for updates.
108
109 Step 2: Update your configuration with the new setting names
110 ------------------------------------------------------------
111
112 If you haven't already updated your configuration when you migrated to Celery 4.0,
113 please do so now.
114
115 We elected to extend the deprecation period until 6.0 since
116 we did not loudly warn about using these deprecated settings.
117
118 Please refer to the :ref:`migration guide <conf-old-settings-map>` for instructions.
119
120 Step 3: Read the important notes in this document
121 -------------------------------------------------
122
123 Make sure you are not affected by any of the important upgrade notes
124 mentioned in the :ref:`following section <v500-important>`.
125
126 You should verify that none of the breaking changes in the CLI
127 do not affect you. Please refer to :ref:`New Command Line Interface <new_command_line_interface>` for details.
128
129 Step 4: Migrate your code to Python 3
130 -------------------------------------
131
132 Celery 5.x only supports Python 3. Therefore, you must ensure your code is
133 compatible with Python 3.
134
135 If you haven't ported your code to Python 3, you must do so before upgrading.
136
137 You can use tools like `2to3 <https://docs.python.org/3.8/library/2to3.html>`_
138 and `pyupgrade <https://github.com/asottile/pyupgrade>`_ to assist you with
139 this effort.
140
141 After the migration is done, run your test suite with Celery 4 to ensure
142 nothing has been broken.
143
144 Step 5: Upgrade to Celery 5.4
145 -----------------------------
146
147 At this point you can upgrade your workers and clients with the new version.
148
149 .. _v540-important:
150
151 Important Notes
152 ===============
153
154 Supported Python Versions
155 -------------------------
156
157 The supported Python versions are:
158
159 - CPython 3.8
160 - CPython 3.9
161 - CPython 3.10
162 - PyPy3.8 7.3.11 (``pypy3``)
163
164 Experimental support
165 ~~~~~~~~~~~~~~~~~~~~
166
167 Celery supports these Python versions provisionally as they are not production
168 ready yet:
169
170 - CPython 3.11
171
172 Quality Improvements and Stability Enhancements
173 -----------------------------------------------
174
175 Celery 5.4 focuses on elevating the overall quality and stability of the project.
176 We have dedicated significant efforts to address various bugs, enhance performance,
177 and make improvements based on valuable user feedback.
178
179 Better Compatibility and Upgrade Confidence
180 -------------------------------------------
181
182 Our goal with Celery 5.4 is to instill confidence in users who are currently
183 using Celery 4 or older versions. We want to assure you that upgrading to
184 Celery 5.4 will provide a more robust and reliable experience.
185
186 Dropped support for Python 3.7
187 ------------------------------
188
189 Celery now requires Python 3.8 and above.
190
191 Python 3.7 will reach EOL in June, 2023.
192 In order to focus our efforts we have dropped support for Python 3.6 in
193 this version.
194
195 If you still require to run Celery using Python 3.7
196 you can still use Celery 5.2.
197 However we encourage you to upgrade to a supported Python version since
198 no further security patches will be applied for Python 3.7 after
199 the 23th of June, 2023.
200
201 Kombu
202 -----
203
204 Starting from v5.4.0, the minimum required version is Kombu 5.3.
205
206 Redis
207 -----
208
209 redis-py 4.5.x is the new minimum required version.
210
211
212 SQLAlchemy
213 ---------------------
214
215 SQLAlchemy 1.4.x & 2.0.x is now supported in celery v5.4
216
217
218 Billiard
219 -------------------
220
221 Minimum required version is now 4.1.0
222
223
224 Deprecate pytz and use zoneinfo
225 -------------------------------
226
227 A switch have been made to zoneinfo for handling timezone data instead of pytz.
228
229 Django
230 ------
231
232 Minimum django version is bumped to v2.2.28.
233 Also added --skip-checks flag to bypass django core checks.