Skip to content

Commit

Permalink
Travis CI: Test Python 3.9 release candidate 1 (celery#6328)
Browse files Browse the repository at this point in the history
* Travis CI: Test Python 3.9 release candidate 1

* fixup! Travis CI: matrix --> jobs

* fixup! Fix indentation error

* fixup! tox.ini: 3.9 --> 3.9-dev

* Fix test failure in Python 3.9RC1.

Co-authored-by: Omer Katz <omer.drow@gmail.com>
  • Loading branch information
2 people authored and jeyrce committed Aug 25, 2021
1 parent 50607eb commit c115b32
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
21 changes: 14 additions & 7 deletions .travis.yml
Expand Up @@ -5,22 +5,32 @@ python:
- '3.6'
- '3.7'
- '3.8'
- '3.9-dev'
os:
- linux
stages:
- test
- integration
- lint
services:
- redis
- docker
env:
global:
- PYTHONUNBUFFERED=yes
- CELERY_TOX_PARALLEL=
matrix:
jobs:
- MATRIX_TOXENV=unit

matrix:
jobs:
fast_finish: true
allow_failures:
- python: '3.9-dev'
include:
- python: '3.9-dev'
env: MATRIX_TOXENV=integration-rabbitmq
stage: integration

- python: 3.8
env: MATRIX_TOXENV=integration-rabbitmq
stage: integration
Expand Down Expand Up @@ -112,21 +122,18 @@ before_install:
wget -qO - https://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
sudo apt-add-repository -y 'deb http://packages.couchbase.com/ubuntu bionic bionic/main'
sudo apt-get update && sudo apt-get install -y libcouchbase-dev
install: pip --disable-pip-version-check install --upgrade-strategy eager -U tox | cat
script: tox $CELERY_TOX_PARALLEL -v -- -v
after_success:
- |
if [[ -v MATRIX_TOXENV || "$TOXENV" =~ "pypy" ]]; then
.tox/$TOXENV/bin/coverage xml
.tox/$TOXENV/bin/codecov -e TOXENV
fi;
install: pip --disable-pip-version-check install --upgrade-strategy eager -U tox | cat
script: tox $CELERY_TOX_PARALLEL -v -- -v
notifications:
email: false
irc:
channels:
- "chat.freenode.net#celery"
on_success: change
on_failure: change
services:
- redis
- docker
6 changes: 6 additions & 0 deletions celery/canvas.py
Expand Up @@ -440,6 +440,12 @@ def __or__(self, other):
return _chain(self, other, app=self._app)
return NotImplemented

def __ior__(self, other):
# Python 3.9 introduces | as the merge operator for dicts.
# We override the in-place version of that operator
# so that canvases continue to work as they did before.
return self.__or__(other)

def election(self):
type = self.type
app = type.app
Expand Down
11 changes: 6 additions & 5 deletions tox.ini
@@ -1,7 +1,7 @@
[tox]
envlist =
{3.6,3.7,3.8,pypy3}-unit
{3.6,3.7,3.8,pypy3}-integration-{rabbitmq,redis,dynamodb,azureblockblob,cache,cassandra,elasticsearch}
{3.6,3.7,3.8,3.9-dev,pypy3}-unit
{3.6,3.7,3.8,3.9-dev,pypy3}-integration-{rabbitmq,redis,dynamodb,azureblockblob,cache,cassandra,elasticsearch}

flake8
apicheck
Expand All @@ -14,9 +14,9 @@ deps=
-r{toxinidir}/requirements/test.txt
-r{toxinidir}/requirements/pkgutils.txt

3.6,3.7,3.8: -r{toxinidir}/requirements/test-ci-default.txt
3.5,3.6,3.7,3.8: -r{toxinidir}/requirements/docs.txt
3.6,3.7,3.8: -r{toxinidir}/requirements/docs.txt
3.6,3.7,3.8,3.9-dev: -r{toxinidir}/requirements/test-ci-default.txt
3.5,3.6,3.7,3.8,3.9-dev: -r{toxinidir}/requirements/docs.txt
3.6,3.7,3.8,3.9-dev: -r{toxinidir}/requirements/docs.txt
pypy3: -r{toxinidir}/requirements/test-ci-base.txt

integration: -r{toxinidir}/requirements/test-integration.txt
Expand Down Expand Up @@ -63,6 +63,7 @@ basepython =
3.6: python3.6
3.7: python3.7
3.8: python3.8
3.9-dev: python3.9
pypy3: pypy3
flake8,apicheck,linkcheck,configcheck,bandit: python3.8
flakeplus: python2.7
Expand Down

0 comments on commit c115b32

Please sign in to comment.