Skip to content

Commit

Permalink
Bug 1330474 - Travis: Stop testing against Python 2 (#4675)
Browse files Browse the repository at this point in the history
Since we've been using Python 3 in production for long enough that we're
confident we won't need to roll back to Python 2.
  • Loading branch information
edmorley committed Feb 25, 2019
1 parent 33b82f8 commit a0d1f5f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 28 deletions.
19 changes: 0 additions & 19 deletions .travis.yml
Expand Up @@ -70,25 +70,6 @@ matrix:
script:
- python -bb -m pytest tests/selenium/

# TODO: Remove once we're confident we won't be reverting back to Python 2.
- env: python2-smoketest
language: python
python: '2.7.15'
cache:
directories:
- ${HOME}/venv
install:
- source ./bin/travis-setup.sh services python_env
# Create the test database for `manage.py check --deploy`.
- mysql -u root -e 'create database test_treeherder;'
script:
- pip check
- python -3 -bb lints/queuelint.py
- flake8 --show-source
- isort --check-only --diff --quiet
- SITE_URL='https://treeherder.dev' TREEHERDER_DEBUG='False' python -3 -bb ./manage.py check --deploy --fail-level WARNING
- python -3 -bb -m pytest tests/ --runslow --ignore=tests/selenium/

notifications:
email:
on_success: never
Expand Down
2 changes: 0 additions & 2 deletions bin/travis-setup.sh
Expand Up @@ -7,8 +7,6 @@ export BROKER_URL='amqp://guest:guest@localhost:5672//'
export DATABASE_URL='mysql://root@localhost/test_treeherder'
export REDIS_URL='redis://localhost:6379'
export TREEHERDER_DJANGO_SECRET_KEY='secretkey-of-at-50-characters-to-pass-check-deploy'
# Suppress warnings shown during pytest startup when using `python2 -3` mode.
export PYTHONWARNINGS='ignore:Overriding __eq__ blocks inheritance of __hash__ in 3.x:DeprecationWarning'

setup_services() {
echo '-----> Running apt-get update'
Expand Down
5 changes: 0 additions & 5 deletions setup.cfg
Expand Up @@ -34,11 +34,6 @@ filterwarnings =
# however this is expected when running tests since Django collectstatic and yarn build
# (which create those directories) typically aren't run apart from during deployments.
ignore:No directory at.*:UserWarning:whitenoise.base
# Hide `python2 -3` mode warnings that are false positives
ignore:Overriding __eq__ blocks inheritance of __hash__ in 3.x:DeprecationWarning
ignore:sys.exc_clear\(\) not supported in 3.x; use except clauses:DeprecationWarning
ignore:classic int division:DeprecationWarning:django.db.backends.base.schema
ignore:In 3.x, reload\(\) is renamed to imp.reload\(\):DeprecationWarning:django.db.migrations.loader
markers =
slow: mark a test as slow.
xfail_strict = true
Expand Down
2 changes: 0 additions & 2 deletions treeherder/client/setup.py
Expand Up @@ -34,8 +34,6 @@ def find_version(*file_paths):
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries :: Python Modules',
Expand Down

0 comments on commit a0d1f5f

Please sign in to comment.