From 0e3cd671da22e1ee1a048588a35bb5050fb4408e Mon Sep 17 00:00:00 2001 From: Kaifeng Wang Date: Wed, 20 Nov 2019 14:00:57 +0800 Subject: [PATCH] Drop python 2.7 support and testing OpenStack is dropping the py2.7 support in ussuri cycle. ironic-inspector is ready with python 3 and ok to drop the python 2.7 support. 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://review.opendev.org/#/c/691178/ Change-Id: Ifae00adf782b6a7d71c4dc45a69a9638b8514d30 --- doc/source/contributor/jobs-description.rst | 2 -- .../notes/drop-py-2-7-bd0a8558f4321435.yaml | 6 ++++++ setup.cfg | 2 -- test-requirements.txt | 1 - tox.ini | 21 ++----------------- zuul.d/project.yaml | 3 --- 6 files changed, 8 insertions(+), 27 deletions(-) create mode 100644 releasenotes/notes/drop-py-2-7-bd0a8558f4321435.yaml diff --git a/doc/source/contributor/jobs-description.rst b/doc/source/contributor/jobs-description.rst index 504ae46b3..22de1b7ec 100644 --- a/doc/source/contributor/jobs-description.rst +++ b/doc/source/contributor/jobs-description.rst @@ -34,8 +34,6 @@ The description of each jobs that runs in the CI when you submit a patch for - Deploys Ironic and Ironic Inspector in DevStack under Python3. Runs tempest tests that match the regex `Inspector` and deploys 1 virtual baremetal. - * - openstack-tox-functional - - Run tox-based functional tests for Ironic Inspector under Python2 * - openstack-tox-functional-py36 - Run tox-based functional tests for Ironic Inspector under Python3.6 * - bifrost-integration-tinyipa-ubuntu-xenial diff --git a/releasenotes/notes/drop-py-2-7-bd0a8558f4321435.yaml b/releasenotes/notes/drop-py-2-7-bd0a8558f4321435.yaml new file mode 100644 index 000000000..037b616a1 --- /dev/null +++ b/releasenotes/notes/drop-py-2-7-bd0a8558f4321435.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. Last release of ironic-inspector + to support Python 2.7 is OpenStack Train. The minimum version of + Python now supported by ironic-inspector is Python 3.6. diff --git a/setup.cfg b/setup.cfg index 98d13e0fd..236601d6c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,8 +14,6 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: OS Independent 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/test-requirements.txt b/test-requirements.txt index 69676d516..20dfcb8ab 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,6 @@ doc8>=0.6.0 # Apache-2.0 flake8-import-order>=0.13 # LGPLv3 hacking>=1.0.0,<1.2.0 # Apache-2.0 mock>=3.0.0 # BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD openstackdocstheme>=1.20.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index f8ee7d71a..5c0662508 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,8 @@ [tox] -envlist = py3,py27,pep8,functional +envlist = py3,pep8,functional-py36 [testenv] +basepython = python3 usedevelop = True install_command = pip install -U {opts} {packages} deps = @@ -18,21 +19,17 @@ setenv = passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:venv] -basepython = python3 commands = {posargs} [testenv:api-ref] -basepython = python3 whitelist_externals = bash commands = sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html [testenv:releasenotes] -basepython = python3 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:cover] -basepython = python3 setenv = {[testenv]setenv} PYTHON=coverage run --branch --omit='*test*' --source ironic_inspector --parallel-mode @@ -44,34 +41,24 @@ commands = coverage html -d ./cover --omit='*test*' [testenv:pep8] -basepython = python3 commands = flake8 ironic_inspector doc8 README.rst CONTRIBUTING.rst doc/source -[testenv:functional] -basepython = python2.7 -commands = - python -m ironic_inspector.test.functional {posargs} - [testenv:functional-py36] -basepython = python3 commands = python3 -m ironic_inspector.test.functional {posargs} [testenv:genconfig] -basepython = python3 envdir = {toxworkdir}/venv commands = oslo-config-generator --config-file {toxinidir}/tools/config-generator.conf [testenv:genpolicy] -basepython = python3 sitepackages = False envdir = {toxworkdir}/venv commands = oslopolicy-sample-generator --config-file {toxinidir}/tools/policy-generator.conf [testenv:genstates] -basepython = python3 deps = {[testenv]deps} commands = {toxinidir}/tools/states_to_dot.py -f {toxinidir}/doc/source/images/states.svg --format svg @@ -90,7 +77,6 @@ application-import-names = ironic_inspector import_exceptions = ironicclient.exceptions,ironic_inspector.common.i18n [testenv:docs] -basepython = python3 setenv = PYTHONHASHSEED=0 sitepackages = False deps = -r{toxinidir}/test-requirements.txt @@ -98,7 +84,6 @@ commands = python setup.py build_sphinx [testenv:pdf-docs] -basepython = python3 whitelist_externals = make deps = {[testenv:docs]deps} commands = @@ -106,14 +91,12 @@ commands = make -C doc/build/pdf [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt [testenv:bandit] -basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands = bandit -r ironic_inspector -x test -n 5 -ll -c tools/bandit.yml diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index eaa3d41fc..15a7fc963 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -3,7 +3,6 @@ - check-requirements - openstack-cover-jobs - openstack-lower-constraints-jobs - - openstack-python-jobs - openstack-python3-ussuri-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 @@ -13,7 +12,6 @@ - ironic-inspector-tempest - ironic-inspector-tempest-discovery - ironic-inspector-non-standalone-tempest - - openstack-tox-functional - openstack-tox-functional-py36 - bifrost-integration-tinyipa-ubuntu-xenial: voting: false @@ -26,5 +24,4 @@ - ironic-inspector-tempest - ironic-inspector-tempest-discovery - ironic-inspector-non-standalone-tempest - - openstack-tox-functional - openstack-tox-functional-py36