Skip to content

Commit

Permalink
Stop supporting Python 2.x
Browse files Browse the repository at this point in the history
With this patch we stop explicit support for Python 2.x.
From now on, all tests are executed with Python 3.x only; future
versions of the code won't guarantee working with versions prior
to 3.6 of Python.
  • Loading branch information
elfosardo committed Dec 16, 2019
1 parent 59211cc commit 1510c25
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ addons:
sudo: false
dist: bionic
python:
- '2.7'
- '3.6'
- '3.7'
- '3.8'
Expand Down
1 change: 0 additions & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Expand Down
9 changes: 2 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[tox]
minversion = 1.6
envlist = py27,py36,py37,py38,pep8,pylint,cover,docs
envlist = py36,py37,py38,pep8,pylint,cover,docs
skipsdist = True

[testenv]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE=1
Expand All @@ -19,18 +20,15 @@ commands =
stestr run {posargs}

[testenv:pep8]
basepython = python3
commands = flake8

[testenv:venv]
basepython = python3
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = {posargs}

[testenv:cover]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
PYTHON=coverage run --source hardware --omit='*tests*' --parallel-mode
Expand All @@ -43,22 +41,19 @@ commands =
coverage xml -o cover/coverage.xml --omit='*tests*'

[testenv:pylint]
basepython = python3
whitelist_externals =
/bin/sh
/bin/bash
/usr/bin/bash
commands = bash -c "{toxinidir}/tools/check-pylint-score.sh 8.91 -j $(nproc) --rcfile {toxinidir}/tools/pylintrc $(find {toxinidir}/hardware -name '*.py'|grep -v '^{toxinidir}/hardware/tests')"

[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -b html -W doc/source doc/build/html

[flake8]
# H803 skipped on purpose per list discussion.
# E123, E125 skipped as they are invalid PEP-8.

show-source = True
ignore = E123,E125,H803,H302
builtins = _
Expand Down

0 comments on commit 1510c25

Please sign in to comment.