Merge "Drop python 2.7 support"

This commit is contained in:
Zuul 2019-12-21 23:37:06 +00:00 committed by Gerrit Code Review
commit 1168458db2
4 changed files with 8 additions and 17 deletions

View File

@ -2,7 +2,6 @@
templates: templates:
- openstack-cover-jobs - openstack-cover-jobs
- openstack-lower-constraints-jobs - openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-ussuri-jobs - openstack-python3-ussuri-jobs
- publish-openstack-docs-pti - publish-openstack-docs-pti
- check-requirements - check-requirements

View File

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

View File

@ -14,8 +14,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
@ -457,9 +455,6 @@ neutron.cli.v2 =
vpn-ikepolicy-update = neutronclient.neutron.v2_0.vpn.ikepolicy:UpdateIKEPolicy vpn-ikepolicy-update = neutronclient.neutron.v2_0.vpn.ikepolicy:UpdateIKEPolicy
vpn-ikepolicy-delete = neutronclient.neutron.v2_0.vpn.ikepolicy:DeleteIKEPolicy vpn-ikepolicy-delete = neutronclient.neutron.v2_0.vpn.ikepolicy:DeleteIKEPolicy
[wheel]
universal = 1
[extract_messages] [extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg mapping_file = babel.cfg

14
tox.ini
View File

@ -1,10 +1,11 @@
[tox] [tox]
# py3 first to avoid .testrepository incompatibility envlist = py37,pep8
envlist = py37,py27,pypy,pep8
minversion = 2.3.2 minversion = 2.3.2
skipsdist = True skipsdist = True
ignore_basepython_conflict = True
[testenv] [testenv]
basepython = python3
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8 LANG=en_US.UTF-8
LANGUAGE=en_US:en LANGUAGE=en_US:en
@ -25,24 +26,20 @@ commands = sh -c "find . -type d -name '.?*' -prune -o \
whitelist_externals = sh whitelist_externals = sh
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = commands =
flake8 flake8
{[testenv:bandit]commands} {[testenv:bandit]commands}
distribute = false distribute = false
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:functional] [testenv:functional]
basepython = python3
setenv = setenv =
OS_TEST_PATH = ./neutronclient/tests/functional OS_TEST_PATH = ./neutronclient/tests/functional
OS_NEUTRONCLIENT_EXEC_DIR = {envdir}/bin OS_NEUTRONCLIENT_EXEC_DIR = {envdir}/bin
[testenv:cover] [testenv:cover]
basepython = python3
setenv = setenv =
{[testenv]setenv} {[testenv]setenv}
PYTHON=coverage run --source neutronclient --parallel-mode PYTHON=coverage run --source neutronclient --parallel-mode
@ -54,12 +51,10 @@ commands =
coverage report coverage report
[testenv:docs] [testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs] [testenv:pdf-docs]
basepython = python3
envdir = {toxworkdir}/docs envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
whitelist_externals = whitelist_externals =
@ -69,7 +64,6 @@ commands =
make -C doc/build/pdf make -C doc/build/pdf
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
@ -82,13 +76,11 @@ import-order-style = pep8
enable-extensions=H904 enable-extensions=H904
[testenv:bandit] [testenv:bandit]
basepython = python3
# B303: blacklist calls: md5, sha1 # B303: blacklist calls: md5, sha1
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r neutronclient -x tests -n5 -s B303 commands = bandit -r neutronclient -x tests -n5 -s B303
[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