Browse Source

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
changes/33/695133/5
Kaifeng Wang 2 weeks ago
parent
commit
0e3cd671da
6 changed files with 8 additions and 27 deletions
  1. +0
    -2
      doc/source/contributor/jobs-description.rst
  2. +6
    -0
      releasenotes/notes/drop-py-2-7-bd0a8558f4321435.yaml
  3. +0
    -2
      setup.cfg
  4. +0
    -1
      test-requirements.txt
  5. +2
    -19
      tox.ini
  6. +0
    -3
      zuul.d/project.yaml

+ 0
- 2
doc/source/contributor/jobs-description.rst View File

@@ -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

+ 6
- 0
releasenotes/notes/drop-py-2-7-bd0a8558f4321435.yaml View File

@@ -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.

+ 0
- 2
setup.cfg View File

@@ -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

+ 0
- 1
test-requirements.txt View File

@@ -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

+ 2
- 19
tox.ini View File

@@ -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


+ 0
- 3
zuul.d/project.yaml View File

@@ -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

Loading…
Cancel
Save