Use Celery 4.x when running on Python 3

Review Request #11188 — Created Sept. 19, 2020 and submitted — Latest diff uploaded

Information

ReviewBot
release-2.0.x

Reviewers

The support matrix between versions of Celery, Django, and Review Board
is tricky and complex. Celery 3.x, the version we were on, doesn't
support running on Python 3. Celery 4.x, which does support Python 3,
doesn't support Django 1.6.

This change makes us conditionally use Celery 4.x when running on Python
3, and Celery 3.x when on Python 2.7. The 3.x version is pinned to
3.1.25 or newer, which introduces a forward-compatible wire protocol
with 4.x. We therefore end up with this support matrix:

RB | Python | Django | Celery
------+--------+--------+------------
3.0.x | 2.7 | 1.6 | 3.1.25+, <4
4.0.x | 2.7 | 1.11 | 3.1.25+, <4
4.0.x | 3.6+ | 1.11 | 4.4+, <5

Configured and ran Review Bot with the server and worker running on
both Python 2.7 and 3.8. Saw that it worked with both the 3.1.25 and
4.4.7 versions of Celery.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Use Celery 4.x when running on Python 3
The support matrix between versions of Celery, Django, and Review Board is tricky and complex. Celery 3.x, the version we were on, doesn't support running on Python 3. Celery 4.x, which does support Python 3, doesn't support Django 1.6. This change makes us conditionally use Celery 4.x when running on Python 3, and Celery 3.x when on Python 2.7. The 3.x version is pinned to 3.1.25 or newer, which introduces a forward-compatible wire protocol with 4.x. We therefore end up with this support matrix: RB | Python | Django | Celery ------+--------+--------+------------ 3.0.x | 2.7 | 1.6 | 3.1.25+, <4 4.0.x | 2.7 | 1.11 | 3.1.25+, <4 4.0.x | 3.6+ | 1.11 | 4.4+, <5 Testing Done: Configured and ran Review Bot with the server and worker running on both Python 2.7 and 3.8. Saw that it worked with both the 3.1.25 and 4.4.7 versions of Celery.
67122ec7c7d25114058be7a381f1b066775513fa David Trowbridge
bot/setup.py
bot/reviewbot/celery.py
extension/setup.py
extension/reviewbotext/extension.py
Loading...