Merge "[ussuri][goal] Drop python 2.7 support and testing"
This commit is contained in:
commit
2550100ada
14
.zuul.yaml
14
.zuul.yaml
@ -22,6 +22,8 @@
|
|||||||
vars:
|
vars:
|
||||||
tox_envlist: all
|
tox_envlist: all
|
||||||
tempest_test_regex: monasca_tempest_tests.tests.event_api
|
tempest_test_regex: monasca_tempest_tests.tests.event_api
|
||||||
|
devstack_localrc:
|
||||||
|
USE_PYTHON3: true
|
||||||
devstack_plugins:
|
devstack_plugins:
|
||||||
monasca-api: https://opendev.org/openstack/monasca-api
|
monasca-api: https://opendev.org/openstack/monasca-api
|
||||||
monasca-log-api: https://opendev.org/openstack/monasca-log-api
|
monasca-log-api: https://opendev.org/openstack/monasca-log-api
|
||||||
@ -33,13 +35,6 @@
|
|||||||
- ^doc/.*$
|
- ^doc/.*$
|
||||||
- ^releasenotes/.*$
|
- ^releasenotes/.*$
|
||||||
|
|
||||||
- job:
|
|
||||||
name: monasca-events-python2
|
|
||||||
parent: monasca-events-tempest-base
|
|
||||||
vars:
|
|
||||||
devstack_localrc:
|
|
||||||
TEMPEST_PLUGINS: /opt/stack/monasca-tempest-plugin
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: monasca-events-python3
|
name: monasca-events-python3
|
||||||
parent: monasca-events-tempest-base
|
parent: monasca-events-tempest-base
|
||||||
@ -52,17 +47,14 @@
|
|||||||
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-train-jobs
|
|
||||||
- check-requirements
|
- check-requirements
|
||||||
- publish-openstack-docs-pti
|
- publish-openstack-docs-pti
|
||||||
- release-notes-jobs-python3
|
- release-notes-jobs-python3
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- monasca-events-python2
|
|
||||||
- monasca-events-python3
|
- monasca-events-python3
|
||||||
gate:
|
gate:
|
||||||
queue: monasca
|
queue: monasca
|
||||||
jobs:
|
jobs:
|
||||||
- monasca-events-python2
|
|
||||||
- monasca-events-python3
|
- monasca-events-python3
|
||||||
|
6
releasenotes/notes/drop-py-2-7-22f6ed725217ced1.yaml
Normal file
6
releasenotes/notes/drop-py-2-7-22f6ed725217ced1.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
Python 2.7 support has been dropped. Last release of monasca-event-api
|
||||||
|
to support python 2.7 is OpenStack Train. The minimum version of Python now
|
||||||
|
supported by monasca-event-api is Python 3.6.
|
@ -13,8 +13,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
|
||||||
|
@ -18,7 +18,6 @@ voluptuous>=0.8.9 # BSD License
|
|||||||
|
|
||||||
# documentation
|
# documentation
|
||||||
doc8>=0.6.0 # Apache-2.0
|
doc8>=0.6.0 # Apache-2.0
|
||||||
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,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
|
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
|
||||||
os-api-ref>=1.0.0 # Apache-2.0
|
os-api-ref>=1.0.0 # Apache-2.0
|
||||||
reno>=2.5.0 # Apache-2.0
|
reno>=2.5.0 # Apache-2.0
|
||||||
|
26
tox.ini
26
tox.ini
@ -1,9 +1,10 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py27,py37,pep8,cover
|
envlist = py37,pep8,cover
|
||||||
minversion = 2.7
|
minversion = 2.7
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
basepython = python3
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
OS_TEST_PATH=monasca_events_api/tests/unit
|
OS_TEST_PATH=monasca_events_api/tests/unit
|
||||||
@ -21,13 +22,6 @@ commands =
|
|||||||
find ./ -type f -name '*.pyc' -delete
|
find ./ -type f -name '*.pyc' -delete
|
||||||
rm -Rf .testrepository/times.dbm
|
rm -Rf .testrepository/times.dbm
|
||||||
|
|
||||||
[testenv:py27]
|
|
||||||
description = Runs unit test using Python2.7
|
|
||||||
basepython = python2.7
|
|
||||||
commands =
|
|
||||||
{[testenv]commands}
|
|
||||||
stestr run {posargs}
|
|
||||||
|
|
||||||
[testenv:py36]
|
[testenv:py36]
|
||||||
description = Runs unit test using Python3.6
|
description = Runs unit test using Python3.6
|
||||||
basepython = python3.6
|
basepython = python3.6
|
||||||
@ -36,7 +30,6 @@ commands =
|
|||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
|
||||||
description = Calculates code coverage
|
description = Calculates code coverage
|
||||||
setenv =
|
setenv =
|
||||||
PYTHON=coverage run --source monasca_events_api --parallel-mode
|
PYTHON=coverage run --source monasca_events_api --parallel-mode
|
||||||
@ -47,34 +40,29 @@ commands =
|
|||||||
coverage xml -o cover/coverage.xml
|
coverage xml -o cover/coverage.xml
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
basepython = python3
|
|
||||||
description = Allows to run unit-test with debug mode enabled
|
description = Allows to run unit-test with debug mode enabled
|
||||||
commands =
|
commands =
|
||||||
{[testenv]commands}
|
{[testenv]commands}
|
||||||
oslo_debug_helper -t {env:OS_TEST_PATH} {posargs}
|
oslo_debug_helper -t {env:OS_TEST_PATH} {posargs}
|
||||||
|
|
||||||
[testenv:bashate]
|
[testenv:bashate]
|
||||||
basepython = python3
|
|
||||||
description = Validates (pep8-like) devstack plugins
|
description = Validates (pep8-like) devstack plugins
|
||||||
skip_install = True
|
skip_install = True
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
commands = bash {toxinidir}/tools/bashate.sh
|
commands = bash {toxinidir}/tools/bashate.sh
|
||||||
|
|
||||||
[testenv:bandit]
|
[testenv:bandit]
|
||||||
basepython = python3
|
|
||||||
skip_install = True
|
skip_install = True
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
commands = bandit -r monasca_events_api -n5 -x monasca_events_api/tests
|
commands = bandit -r monasca_events_api -n5 -x monasca_events_api/tests
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:flake8]
|
||||||
basepython = python3
|
|
||||||
skip_install = True
|
skip_install = True
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
commands =
|
commands =
|
||||||
flake8 monasca_events_api
|
flake8 monasca_events_api
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
|
||||||
description = Runs set of linters against codebase (flake8, bandit, bashate, checkniceness)
|
description = Runs set of linters against codebase (flake8, bandit, bashate, checkniceness)
|
||||||
commands =
|
commands =
|
||||||
{[testenv:flake8]commands}
|
{[testenv:flake8]commands}
|
||||||
@ -83,7 +71,6 @@ commands =
|
|||||||
{[testenv:checkniceness]commands}
|
{[testenv:checkniceness]commands}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
|
||||||
description = Builds api-ref, releasenotes and devdocs
|
description = Builds api-ref, releasenotes and devdocs
|
||||||
commands =
|
commands =
|
||||||
{[testenv:devdocs]commands}
|
{[testenv:devdocs]commands}
|
||||||
@ -91,7 +78,6 @@ commands =
|
|||||||
{[testenv:releasenotes]commands}
|
{[testenv:releasenotes]commands}
|
||||||
|
|
||||||
[testenv:api-ref]
|
[testenv:api-ref]
|
||||||
basepython = python3
|
|
||||||
description = Called from CI scripts to test and publish the API Ref
|
description = Called from CI scripts to test and publish the API Ref
|
||||||
commands =
|
commands =
|
||||||
rm -rf api-ref/build
|
rm -rf api-ref/build
|
||||||
@ -99,14 +85,12 @@ commands =
|
|||||||
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
|
||||||
description = Called from CI script to test and publish the Release Notes
|
description = Called from CI script to test and publish the Release Notes
|
||||||
commands =
|
commands =
|
||||||
rm -rf releasenotes/build
|
rm -rf releasenotes/build
|
||||||
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
[testenv:devdocs]
|
[testenv:devdocs]
|
||||||
basepython = python3
|
|
||||||
description = Builds developer documentation
|
description = Builds developer documentation
|
||||||
commands =
|
commands =
|
||||||
{[testenv]commands}
|
{[testenv]commands}
|
||||||
@ -116,7 +100,6 @@ commands =
|
|||||||
python setup.py build_sphinx
|
python setup.py build_sphinx
|
||||||
|
|
||||||
[testenv:checkniceness]
|
[testenv:checkniceness]
|
||||||
basepython = python3
|
|
||||||
description = Validates (pep-like) documentation
|
description = Validates (pep-like) documentation
|
||||||
skip_install = True
|
skip_install = True
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
@ -126,7 +109,6 @@ commands =
|
|||||||
doc8 --file-encoding utf-8 {toxinidir}/releasenotes
|
doc8 --file-encoding utf-8 {toxinidir}/releasenotes
|
||||||
|
|
||||||
[testenv:checkjson]
|
[testenv:checkjson]
|
||||||
basepython = python3
|
|
||||||
description = Validates all json samples inside doc folder
|
description = Validates all json samples inside doc folder
|
||||||
deps =
|
deps =
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
@ -137,17 +119,14 @@ commands =
|
|||||||
bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
|
bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
|
||||||
|
|
||||||
[testenv:genconfig]
|
[testenv:genconfig]
|
||||||
basepython = python3
|
|
||||||
description = Generates sample documentation file for monasca-events-api
|
description = Generates sample documentation file for monasca-events-api
|
||||||
commands = oslo-config-generator --config-file=config-generator/config.conf
|
commands = oslo-config-generator --config-file=config-generator/config.conf
|
||||||
|
|
||||||
[testenv:genpolicy]
|
[testenv:genpolicy]
|
||||||
basepython = python3
|
|
||||||
description = Generates sample policy.yaml file for monasca-events-api
|
description = Generates sample policy.yaml file for monasca-events-api
|
||||||
commands = oslopolicy-sample-generator --config-file=config-generator/policy.conf
|
commands = oslopolicy-sample-generator --config-file=config-generator/policy.conf
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
@ -159,7 +138,6 @@ ignore = D100,D104
|
|||||||
import-order-style = pep8
|
import-order-style = pep8
|
||||||
|
|
||||||
[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
|
||||||
|
Loading…
Reference in New Issue
Block a user