Merge "Get rid of Python 2 support"

This commit is contained in:
Zuul 2020-01-07 14:31:46 +00:00 committed by Gerrit Code Review
commit adaaad52d6
5 changed files with 8 additions and 16 deletions

View File

@ -3,8 +3,6 @@ libffi-dev [platform:dpkg]
libffi-devel [platform:rpm] libffi-devel [platform:rpm]
gcc [platform:rpm] gcc [platform:rpm]
gcc [platform:dpkg] gcc [platform:dpkg]
python-dev [platform:dpkg]
python-devel [platform:rpm]
python3-dev [platform:dpkg] python3-dev [platform:dpkg]
python3-devel [platform:rpm] python3-devel [platform:rpm]
openssl-devel [platform:rpm] openssl-devel [platform:rpm]

View File

@ -7,6 +7,5 @@
# be installed in a specific order. # be installed in a specific order.
openstackdocstheme>=1.19.0 # Apache-2.0 openstackdocstheme>=1.19.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
Python 2.7 support has been dropped. Last release of kolla-ansible to
support Python 2.7 is OpenStack Train. The minimum version of Python now
supported by kolla-ansible 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

13
tox.ini
View File

@ -1,9 +1,10 @@
[tox] [tox]
minversion = 2.5.0 minversion = 2.5.0
skipsdist = True skipsdist = True
envlist = py27,py37,pep8,pypy envlist = py37,pep8,pypy
[testenv] [testenv]
basepython = python3
usedevelop=True usedevelop=True
whitelist_externals = find whitelist_externals = find
rm rm
@ -20,11 +21,9 @@ commands =
stestr run --slowest {posargs} stestr run --slowest {posargs}
[testenv:debug] [testenv:debug]
basepython = python3
commands = oslo_debug_helper -t tests {posargs} commands = oslo_debug_helper -t tests {posargs}
[testenv:cover] [testenv:cover]
basepython = python3
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
NOSE_WITH_COVERAGE=1 NOSE_WITH_COVERAGE=1
NOSE_COVER_BRANCHES=1 NOSE_COVER_BRANCHES=1
@ -38,7 +37,6 @@ commands =
coverage xml -o cover/coverage.xml coverage xml -o cover/coverage.xml
[testenv:pep8] [testenv:pep8]
basepython = python3
# sphinx needs to be installed to make doc8 work properly # sphinx needs to be installed to make doc8 work properly
deps = deps =
{[testenv]deps} {[testenv]deps}
@ -54,11 +52,9 @@ commands =
[testenv:bandit] [testenv:bandit]
# B303: Use of insecure MD2, MD4, MD5, or SHA1 hash function. # B303: Use of insecure MD2, MD4, MD5, or SHA1 hash function.
basepython = python3
commands = bandit --skip B303 -r ansible kolla_ansible tests tools commands = bandit --skip B303 -r ansible kolla_ansible tests tools
[testenv:venv] [testenv:venv]
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}/test-requirements.txt -r{toxinidir}/test-requirements.txt
@ -66,7 +62,6 @@ deps =
commands = {posargs} commands = {posargs}
[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
@ -76,7 +71,6 @@ commands =
sphinx-build -W --keep-going -b html doc/source doc/build/html sphinx-build -W --keep-going -b html doc/source doc/build/html
[testenv:deploy-guide] [testenv:deploy-guide]
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
@ -87,7 +81,6 @@ commands =
sphinx-build -a -E -W -d deploy-guide/build/doctrees --keep-going -b html deploy-guide/source deploy-guide/build/html sphinx-build -a -E -W -d deploy-guide/build/doctrees --keep-going -b html deploy-guide/source deploy-guide/build/html
[testenv:pdf-docs] [testenv:pdf-docs]
basepython = python3
whitelist_externals = make whitelist_externals = make
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
commands = commands =
@ -95,7 +88,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
@ -109,7 +101,6 @@ show-source = True
exclude=.eggs,.git,.tox,doc exclude=.eggs,.git,.tox,doc
[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