Use Celery 4.x when running on Python 3

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

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.

Summary ID
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
Description From Last Updated

You can just do "2.7".

chipx86chipx86

You can just do "2.7".

chipx86chipx86
chipx86
  1. That was a smaller change than I expected.

  2. bot/setup.py (Diff revision 1)
     
     
    Show all issues

    You can just do "2.7".

  3. extension/setup.py (Diff revision 1)
     
     
    Show all issues

    You can just do "2.7".

  4. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (cb09372)