diff --git a/lower-constraints.txt b/lower-constraints.txt index f137ec0..4d86aa1 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -49,7 +49,6 @@ python-subunit==1.0.0 requests==2.14.2 requests-mock==1.1.0 rfc3986==0.3.1 -six==1.10.0 stestr==2.0.0 testscenarios==0.4 testtools==2.2.0 diff --git a/octaviaclient/tests/fakes.py b/octaviaclient/tests/fakes.py index 5676e76..661e92f 100644 --- a/octaviaclient/tests/fakes.py +++ b/octaviaclient/tests/fakes.py @@ -21,7 +21,6 @@ from oslo_serialization import jsonutils from keystoneauth1 import fixture import requests -import six AUTH_TOKEN = "foobar" @@ -244,7 +243,7 @@ class FakeResponse(requests.Response): self.headers.update(headers) self._content = jsonutils.dumps(data) - if not isinstance(self._content, six.binary_type): + if not isinstance(self._content, bytes): self._content = self._content.encode() diff --git a/releasenotes/notes/drop-python-2-7-7b427838d72ef248.yaml b/releasenotes/notes/drop-python-2-7-7b427838d72ef248.yaml new file mode 100644 index 0000000..20d6af3 --- /dev/null +++ b/releasenotes/notes/drop-python-2-7-7b427838d72ef248.yaml @@ -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. diff --git a/requirements.txt b/requirements.txt index 5cb24d8..b46f09b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,4 +12,3 @@ oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0 oslo.utils>=3.33.0 # Apache-2.0 pbr!=2.1.0,>=2.0.0 # Apache-2.0 requests>=2.14.2 # Apache-2.0 -six>=1.10.0 # MIT diff --git a/setup.cfg b/setup.cfg index 64d59c1..1480f5b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/tox.ini b/tox.ini index 6cbcb2f..b40efa1 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,10 @@ [tox] minversion = 2.5.0 -envlist = py27,py37,pep8 +envlist = py37,pep8 skipsdist = True [testenv] +basepython = python3 usedevelop = True whitelist_externals = find @@ -21,15 +22,12 @@ commands = stestr slowest [testenv:pep8] -basepython = python3 commands = flake8 {posargs} [testenv:venv] -basepython = python3 commands = {posargs} [testenv:cover] -basepython = python3 setenv = {[testenv]setenv} PYTHON=coverage run --source octaviaclient --parallel-mode @@ -45,7 +43,6 @@ commands = coverage report --fail-under=90 --skip-covered [testenv:docs] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt @@ -55,7 +52,6 @@ commands = sphinx-build -W -b html doc/source doc/build/html [testenv:pdf-docs] -basepython = python3 deps = {[testenv:docs]deps} whitelist_externals = make @@ -66,7 +62,6 @@ commands = make -C doc/build/pdf [testenv:releasenotes] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -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 [testenv:debug] -basepython = python3 passenv = OS_* commands = 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 [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt [testenv:requirements] -basepython = python3 deps = -egit+https://opendev.org/openstack/requirements#egg=openstack-requirements whitelist_externals = sh diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml index 88dd382..0952755 100644 --- a/zuul.d/projects.yaml +++ b/zuul.d/projects.yaml @@ -3,8 +3,7 @@ - check-requirements - openstack-cover-jobs - openstack-lower-constraints-jobs - - openstack-python-jobs - - openstack-python3-train-jobs + - openstack-python3-ussuri-jobs - openstackclient-plugin-jobs - publish-openstack-docs-pti - release-notes-jobs-python3