Skip to content

Commit

Permalink
Fix Travis CI job for Python 3.7 (celery#5672)
Browse files Browse the repository at this point in the history
The typing package is a built-in for all currently supported
Python versions, so it seems to be not required anymore.
Presence of this package leads to an error on CI for Python 3.7.

These changes also:

 - remove redundant options from .travis.yml
  • Loading branch information
Jamim authored and auvipy committed Aug 10, 2019
1 parent 78d7504 commit c870b07
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
language: python
sudo: required
dist: xenial
cache: pip
python:
Expand Down Expand Up @@ -57,11 +56,9 @@ matrix:
stage: lint
- python: pypy2.7-7.1.1
env: TOXENV=pypy
dist: xenial
before_install: sudo apt-get update && sudo apt-get install libgnutls-dev
- python: pypy3.5-7.0
env: TOXENV=pypy3
dist: xenial
before_install: sudo apt-get update && sudo apt-get install libgnutls-dev

before_install:
Expand Down
1 change: 0 additions & 1 deletion requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
sphinx_celery==1.4.6
Sphinx==1.8.5
sphinx-testing==0.7.2
typing
-r extras/sqlalchemy.txt
-r test.txt
-r deps/mock.txt
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ basepython =
flake8,apicheck,linkcheck,configcheck,pydocstyle,bandit: python3.7
flakeplus: python2.7
usedevelop = True
install_command = python -m pip --disable-pip-version-check install {opts} {packages}
install_command = {toxinidir}/tox_install_command.sh {opts} {packages}

[testenv:apicheck]
setenv =
Expand Down
9 changes: 9 additions & 0 deletions tox_install_command.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

pip --disable-pip-version-check install "$@"

if [[ "${TRAVIS_PYTHON_VERSION}" == "3.7" ]]; then
# We have to uninstall the typing package which comes along with
# the couchbase package in order to prevent an error on CI for Python 3.7.
pip uninstall typing -y
fi

0 comments on commit c870b07

Please sign in to comment.