[ussuri][goal] Drop python 2.7

OpenStack is dropping the py2.7 support in ussuri cycle.

openstack ansible also drops python 2.7 support
and cleanup tox and requirements for python2.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I909ef41d8a8d857c56ed93a142d2ff951a9bf1ba
This commit is contained in:
Ghanshyam Mann 2020-02-29 18:33:57 -06:00
parent 91417e37f6
commit 7720597343
4 changed files with 9 additions and 18 deletions

View File

@ -3,8 +3,7 @@
# process, which may cause wedges in the gate later.
# this is required for the docs build jobs
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 # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
openstackdocstheme>=1.29.2 # Apache-2.0
reno>=2.11.3 # Apache-2.0

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
Python 2.7 support has been dropped. Last release of openstack ansible
to support python 2.7 is OpenStack Train.

View File

@ -3,7 +3,6 @@
# process, which may cause wedges in the gate later.
pyasn1!=0.2.3,>=0.1.8 # BSD
pyOpenSSL>=17.1.0 # Apache-2.0
ndg-httpsclient>=0.4.2;python_version<'3.0' # BSD
netaddr>=0.7.18 # BSD
PrettyTable<0.8,>=0.7.1 # BSD
python-memcached>=1.56 # PSF

18
tox.ini
View File

@ -1,11 +1,12 @@
[tox]
minversion = 2.0
minversion = 3.1
skipsdist = True
envlist = linters,docs,releasenotes,inventory,py3-inventory
ignore_basepython_conflict = True
[testenv]
usedevelop = True
basepython = python2.7
basepython = python3
install_command =
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/upper-constraints.txt} {opts} {packages}
deps =
@ -36,19 +37,16 @@ setenv =
ANSIBLE_LINT_PARAMS=--exclude={homedir}/.ansible/roles
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
doc8 doc
docstheme-build-translated.sh
[testenv:deploy-guide]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d deploy-guide/build/doctrees --keep-going -b html deploy-guide/source deploy-guide/build/html
[testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps}
whitelist_externals =
make
@ -62,19 +60,16 @@ extensions = .rst
ignore = D001
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
# environment used by the -infra templated docs job
[testenv:venv]
basepython = python3
commands =
{posargs}
[testenv:pep8]
basepython = python3
commands =
bash -c "{toxinidir}/tests/common/test-pep8.sh"
@ -85,7 +80,6 @@ commands =
ignore=F403
[testenv:bashate]
basepython = python3
commands =
bash -c "{toxinidir}/tests/common/test-bashate.sh"
@ -99,28 +93,24 @@ commands =
# or for a stable branch:
# https://opendev.org/openstack/openstack-ansible-tests/raw/stable/stein/test-ansible-deps.txt
[testenv:ansible]
basepython = python3
deps =
{[testenv]deps}
-r{toxinidir}/global-requirement-pins.txt
-rhttps://opendev.org/openstack/openstack-ansible-tests/raw/test-ansible-deps.txt
[testenv:ansible-syntax]
basepython = python3
deps =
{[testenv:ansible]deps}
commands =
bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
[testenv:ansible-lint]
basepython = python3
deps =
{[testenv:ansible]deps}
commands =
bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
[testenv:inventory]
basepython = python3
# Use a fixed seed since some inventory tests rely on specific ordering
setenv =
{[testenv]setenv}
@ -135,14 +125,12 @@ commands =
coverage report --show-missing --include={toxinidir}/inventory/*,{toxinidir}/osa_toolkit/*
[testenv:py3-inventory]
basepython = python3.5
setenv =
{[testenv:inventory]setenv}
commands =
{[testenv:inventory]commands}
[testenv:linters]
basepython = python3
deps =
{[testenv:ansible]deps}
commands =