Stop testing python 2

Since it's no longer supported past Train, let's stop
running the tests.

Change-Id: Id3b522ea6939993d169cb520450a5458810a3e5b
This commit is contained in:
Brian Haley 2019-11-07 15:18:53 +08:00
parent cd6482966a
commit 825bc55f12
7 changed files with 9 additions and 18 deletions

View File

@ -49,7 +49,6 @@ python-subunit==1.0.0
requests==2.14.2 requests==2.14.2
requests-mock==1.1.0 requests-mock==1.1.0
rfc3986==0.3.1 rfc3986==0.3.1
six==1.10.0
stestr==2.0.0 stestr==2.0.0
testscenarios==0.4 testscenarios==0.4
testtools==2.2.0 testtools==2.2.0

View File

@ -21,7 +21,6 @@ from oslo_serialization import jsonutils
from keystoneauth1 import fixture from keystoneauth1 import fixture
import requests import requests
import six
AUTH_TOKEN = "foobar" AUTH_TOKEN = "foobar"
@ -244,7 +243,7 @@ class FakeResponse(requests.Response):
self.headers.update(headers) self.headers.update(headers)
self._content = jsonutils.dumps(data) self._content = jsonutils.dumps(data)
if not isinstance(self._content, six.binary_type): if not isinstance(self._content, bytes):
self._content = self._content.encode() self._content = self._content.encode()

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
Python 2.7 support has been dropped. The minimum version of Python now
supported by python-octaviaclient is Python 3.6.

View File

@ -12,4 +12,3 @@ oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0 oslo.utils>=3.33.0 # Apache-2.0
pbr!=2.1.0,>=2.0.0 # Apache-2.0 pbr!=2.1.0,>=2.0.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0 requests>=2.14.2 # Apache-2.0
six>=1.10.0 # MIT

View File

@ -13,8 +13,6 @@ classifier =
License :: OSI Approved :: Apache Software License License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux Operating System :: POSIX :: Linux
Programming Language :: Python Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3 Programming Language :: Python :: 3
Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.7

12
tox.ini
View File

@ -1,9 +1,10 @@
[tox] [tox]
minversion = 2.5.0 minversion = 2.5.0
envlist = py27,py37,pep8 envlist = py37,pep8
skipsdist = True skipsdist = True
[testenv] [testenv]
basepython = python3
usedevelop = True usedevelop = True
whitelist_externals = whitelist_externals =
find find
@ -21,15 +22,12 @@ commands =
stestr slowest stestr slowest
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = flake8 {posargs} commands = flake8 {posargs}
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3
setenv = setenv =
{[testenv]setenv} {[testenv]setenv}
PYTHON=coverage run --source octaviaclient --parallel-mode PYTHON=coverage run --source octaviaclient --parallel-mode
@ -45,7 +43,6 @@ commands =
coverage report --fail-under=90 --skip-covered coverage report --fail-under=90 --skip-covered
[testenv:docs] [testenv:docs]
basepython = python3
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
@ -55,7 +52,6 @@ commands =
sphinx-build -W -b html doc/source doc/build/html sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs] [testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
whitelist_externals = whitelist_externals =
make make
@ -66,7 +62,6 @@ commands =
make -C doc/build/pdf make -C doc/build/pdf
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
@ -76,7 +71,6 @@ commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:debug] [testenv:debug]
basepython = python3
passenv = OS_* passenv = OS_*
commands = commands =
pip install -q -U ipdb pip install -q -U ipdb
@ -92,14 +86,12 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
local-check-factory = octaviaclient.hacking.checks.factory local-check-factory = octaviaclient.hacking.checks.factory
[testenv:lower-constraints] [testenv:lower-constraints]
basepython = python3
deps = deps =
-c{toxinidir}/lower-constraints.txt -c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
[testenv:requirements] [testenv:requirements]
basepython = python3
deps = deps =
-egit+https://opendev.org/openstack/requirements#egg=openstack-requirements -egit+https://opendev.org/openstack/requirements#egg=openstack-requirements
whitelist_externals = sh whitelist_externals = sh

View File

@ -3,8 +3,7 @@
- check-requirements - check-requirements
- openstack-cover-jobs - openstack-cover-jobs
- openstack-lower-constraints-jobs - openstack-lower-constraints-jobs
- openstack-python-jobs - openstack-python3-ussuri-jobs
- openstack-python3-train-jobs
- openstackclient-plugin-jobs - openstackclient-plugin-jobs
- publish-openstack-docs-pti - publish-openstack-docs-pti
- release-notes-jobs-python3 - release-notes-jobs-python3