[ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle. monasca-api 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://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html Depends-On: https://review.opendev.org/#/c/693631/ Change-Id: I5daa9bb079d0373d0e1379d20e98dd5c0880d312
This commit is contained in:
parent
5609a28830
commit
e2789e8a9d
66
.zuul.yaml
66
.zuul.yaml
|
@ -45,6 +45,8 @@
|
|||
horizon: false
|
||||
monasca-log: false
|
||||
tox_envlist: all
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: true
|
||||
tempest_test_regex: monasca_tempest_tests.tests.api
|
||||
devstack_plugins:
|
||||
monasca-api: https://opendev.org/openstack/monasca-api
|
||||
|
@ -109,6 +111,8 @@
|
|||
cinder: false
|
||||
horizon: false
|
||||
tox_envlist: all
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: true
|
||||
tempest_test_regex: monasca_tempest_tests.tests.log_api
|
||||
devstack_plugins:
|
||||
monasca-api: https://opendev.org/openstack/monasca-api
|
||||
|
@ -125,22 +129,11 @@
|
|||
- ^doc/.*$
|
||||
- ^releasenotes/.*$
|
||||
|
||||
- job:
|
||||
name: monasca-tempest-python2-influxdb
|
||||
parent: monasca-tempest-base
|
||||
vars:
|
||||
devstack_localrc:
|
||||
MONASCA_API_IMPLEMENTATION_LANG: python
|
||||
MONASCA_PERSISTER_IMPLEMENTATION_LANG: python
|
||||
MONASCA_METRICS_DB: influxdb
|
||||
TEMPEST_PLUGINS: /opt/stack/monasca-tempest-plugin
|
||||
|
||||
- job:
|
||||
name: monasca-tempest-python3-influxdb
|
||||
parent: monasca-tempest-base
|
||||
vars:
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: true
|
||||
MONASCA_API_IMPLEMENTATION_LANG: python
|
||||
MONASCA_PERSISTER_IMPLEMENTATION_LANG: python
|
||||
MONASCA_METRICS_DB: influxdb
|
||||
|
@ -152,57 +145,29 @@
|
|||
voting: false
|
||||
vars:
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: false
|
||||
MONASCA_API_IMPLEMENTATION_LANG: python
|
||||
MONASCA_PERSISTER_IMPLEMENTATION_LANG: java
|
||||
MONASCA_METRICS_DB: influxdb
|
||||
TEMPEST_PLUGINS: /opt/stack/monasca-tempest-plugin
|
||||
|
||||
- job:
|
||||
name: monasca-tempest-python2-cassandra
|
||||
parent: monasca-tempest-base
|
||||
vars:
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: false
|
||||
MONASCA_API_IMPLEMENTATION_LANG: python
|
||||
MONASCA_PERSISTER_IMPLEMENTATION_LANG: python
|
||||
MONASCA_METRICS_DB: cassandra
|
||||
TEMPEST_PLUGINS: /opt/stack/monasca-tempest-plugin
|
||||
tempest_test_regex: (?!.*\[.*\btimerange\b.*\])(^monasca_tempest_tests.tests.api)
|
||||
|
||||
- job:
|
||||
name: monasca-tempest-python3-cassandra
|
||||
parent: monasca-tempest-base
|
||||
voting: false
|
||||
vars:
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: true
|
||||
MONASCA_API_IMPLEMENTATION_LANG: python
|
||||
MONASCA_PERSISTER_IMPLEMENTATION_LANG: python
|
||||
MONASCA_METRICS_DB: cassandra
|
||||
TEMPEST_PLUGINS: /opt/stack/monasca-tempest-plugin
|
||||
tempest_test_regex: (?!.*\[.*\btimerange\b.*\])(^monasca_tempest_tests.tests.api)
|
||||
|
||||
- job:
|
||||
name: monasca-tempest-python2-java-cassandra
|
||||
parent: monasca-tempest-base
|
||||
voting: false
|
||||
vars:
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: false
|
||||
MONASCA_API_IMPLEMENTATION_LANG: python
|
||||
MONASCA_PERSISTER_IMPLEMENTATION_LANG: java
|
||||
MONASCA_METRICS_DB: cassandra
|
||||
TEMPEST_PLUGINS: /opt/stack/monasca-tempest-plugin
|
||||
tempest_test_regex: (?!.*\[.*\btimerange\b.*\])(^monasca_tempest_tests.tests.api)
|
||||
|
||||
- job:
|
||||
name: monasca-tempest-python3-java-cassandra
|
||||
parent: monasca-tempest-base
|
||||
voting: false
|
||||
vars:
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: true
|
||||
MONASCA_API_IMPLEMENTATION_LANG: python
|
||||
MONASCA_PERSISTER_IMPLEMENTATION_LANG: java
|
||||
MONASCA_METRICS_DB: cassandra
|
||||
|
@ -214,19 +179,6 @@
|
|||
parent: monasca-tempest-log-base
|
||||
vars:
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: true
|
||||
USE_OLD_LOG_API: false
|
||||
MONASCA_API_IMPLEMENTATION_LANG: python
|
||||
MONASCA_PERSISTER_IMPLEMENTATION_LANG: python
|
||||
MONASCA_METRICS_DB: influxdb
|
||||
TEMPEST_PLUGINS: /opt/stack/monasca-tempest-plugin
|
||||
|
||||
- job:
|
||||
name: monasca-tempest-log-python2-influxdb
|
||||
parent: monasca-tempest-log-base
|
||||
vars:
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: false
|
||||
USE_OLD_LOG_API: false
|
||||
MONASCA_API_IMPLEMENTATION_LANG: python
|
||||
MONASCA_PERSISTER_IMPLEMENTATION_LANG: python
|
||||
|
@ -238,7 +190,6 @@
|
|||
parent: monasca-tempest-log-base
|
||||
vars:
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: true
|
||||
USE_OLD_LOG_API: false
|
||||
MONASCA_API_IMPLEMENTATION_LANG: python
|
||||
MONASCA_PERSISTER_IMPLEMENTATION_LANG: python
|
||||
|
@ -250,25 +201,20 @@
|
|||
- check-requirements
|
||||
- openstack-cover-jobs
|
||||
- openstack-lower-constraints-jobs
|
||||
- openstack-python-jobs
|
||||
- openstack-python3-train-jobs
|
||||
- openstack-python3-ussuri-jobs
|
||||
- publish-openstack-docs-pti
|
||||
- release-notes-jobs-python3
|
||||
check:
|
||||
jobs:
|
||||
- monasca-tempest-log-python3-influxdb
|
||||
- monasca-tempest-python2-influxdb
|
||||
- monasca-tempest-python3-influxdb
|
||||
- monasca-tempest-python2-cassandra
|
||||
- monasca-tempest-python2-java-cassandra
|
||||
- monasca-tempest-python3-cassandra
|
||||
- build-monasca-docker-image
|
||||
gate:
|
||||
queue: monasca
|
||||
jobs:
|
||||
- monasca-tempest-log-python3-influxdb
|
||||
- monasca-tempest-python2-influxdb
|
||||
- monasca-tempest-python3-influxdb
|
||||
- monasca-tempest-python2-cassandra
|
||||
post:
|
||||
jobs:
|
||||
- publish-monasca-api-docker-image
|
||||
|
|
|
@ -62,7 +62,7 @@ directory of this project
|
|||
|
||||
::
|
||||
|
||||
$ tox -e py27
|
||||
$ tox -e py36
|
||||
|
||||
Start the Server - for Apache
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
Python 2.7 support has been dropped. Last release of monasca-api
|
||||
to support python 2.7 is OpenStack Train. The minimum version of Python now
|
||||
supported by monasca-api is Python 3.6.
|
|
@ -14,8 +14,6 @@ classifier =
|
|||
License :: OSI Approved :: Apache Software License
|
||||
Operating System :: POSIX :: Linux
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 2
|
||||
Programming Language :: Python :: 2.7
|
||||
Programming Language :: Python :: 3.6
|
||||
Programming Language :: Python :: 3.7
|
||||
|
||||
|
|
|
@ -10,10 +10,8 @@ coverage!=4.4,>=4.0 # Apache-2.0
|
|||
cassandra-driver!=3.6.0,>=3.3.0 # Apache-2.0
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
httplib2>=0.9.1 # MIT
|
||||
influxdb>=2.9.2,!=5.2.0,!=5.2.1,!=5.2.2;python_version<'3.0' # MIT
|
||||
influxdb>=2.9.2;python_version>='3.0' # MIT
|
||||
mock>=2.0.0 # BSD
|
||||
funcsigs>=1.0.0;python_version=='2.7' or python_version=='2.6' # Apache-2.0
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
requests-mock>=1.2.0 # Apache-2.0
|
||||
stestr>=1.0.0 # Apache-2.0
|
||||
|
@ -27,7 +25,6 @@ tempest>=17.1.0 # Apache-2.0
|
|||
|
||||
# documentation
|
||||
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
|
||||
os-api-ref>=1.4.0 # Apache-2.0
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
|
|
21
tox.ini
21
tox.ini
|
@ -1,9 +1,10 @@
|
|||
[tox]
|
||||
envlist = py27,py37,pep8,cover
|
||||
envlist = py37,pep8,cover
|
||||
minversion = 2.7
|
||||
skipsdist = True
|
||||
|
||||
[testenv]
|
||||
basepython = python3
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
OS_TEST_PATH=monasca_api/tests
|
||||
|
@ -24,7 +25,6 @@ commands =
|
|||
stestr run {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
commands =
|
||||
coverage erase
|
||||
python setup.py test --coverage --testr-args='{posargs}' \
|
||||
|
@ -32,19 +32,16 @@ commands =
|
|||
coverage report
|
||||
|
||||
[testenv:debug]
|
||||
basepython = python3
|
||||
commands =
|
||||
oslo_debug_helper -t ./monasca_api/tests {posargs}
|
||||
|
||||
[testenv:flake8]
|
||||
basepython = python3
|
||||
skip_install = True
|
||||
usedevelop = False
|
||||
commands =
|
||||
flake8 monasca_api
|
||||
|
||||
[testenv:bandit]
|
||||
basepython = python3
|
||||
skip_install = True
|
||||
usedevelop = False
|
||||
commands =
|
||||
|
@ -53,13 +50,11 @@ commands =
|
|||
bandit -r monasca_api -n5 -s B101,B303 -x monasca_api/tests
|
||||
|
||||
[testenv:bashate]
|
||||
basepython = python3
|
||||
skip_install = True
|
||||
usedevelop = False
|
||||
commands = bash {toxinidir}/tools/bashate.sh
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
commands =
|
||||
{[testenv:flake8]commands}
|
||||
{[testenv:bandit]commands}
|
||||
|
@ -67,7 +62,6 @@ commands =
|
|||
{[testenv:checkniceness]commands}
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
description = Builds api-ref, api-guide, releasenotes and devdocs
|
||||
commands =
|
||||
{[testenv:devdocs]commands}
|
||||
|
@ -75,7 +69,6 @@ commands =
|
|||
{[testenv:releasenotes]commands}
|
||||
|
||||
[testenv:pdf-docs]
|
||||
basepython = python3
|
||||
envdir = {toxworkdir}/docs
|
||||
whitelist_externals =
|
||||
make
|
||||
|
@ -86,7 +79,6 @@ commands =
|
|||
make -C doc/build/pdf
|
||||
|
||||
[testenv:api-ref]
|
||||
basepython = python3
|
||||
description = Called from CI scripts to test and publish the API Ref
|
||||
commands =
|
||||
rm -rf api-ref/build
|
||||
|
@ -95,7 +87,6 @@ commands =
|
|||
api-ref/source api-ref/build/html
|
||||
|
||||
[testenv:releasenotes]
|
||||
basepython = python3
|
||||
description = Called from CI script to test and publish the Release Notes
|
||||
commands =
|
||||
rm -rf releasenotes/build
|
||||
|
@ -103,7 +94,6 @@ commands =
|
|||
releasenotes/source releasenotes/build/html
|
||||
|
||||
[testenv:devdocs]
|
||||
basepython = python3
|
||||
description = Builds developer documentation
|
||||
commands =
|
||||
rm -rf doc/build doc/source/contributor/api
|
||||
|
@ -111,7 +101,6 @@ commands =
|
|||
python setup.py build_sphinx
|
||||
|
||||
[testenv:checkniceness]
|
||||
basepython = python3
|
||||
skip_install = True
|
||||
usedevelop = False
|
||||
description = Validates (pep-like) documenation
|
||||
|
@ -123,7 +112,6 @@ commands =
|
|||
doc8 --file-encoding utf-8 {toxinidir}/releasenotes
|
||||
|
||||
[testenv:checkjson]
|
||||
basepython = python3
|
||||
description = Validates all json samples inside doc folder
|
||||
deps =
|
||||
skip_install = True
|
||||
|
@ -137,21 +125,17 @@ commands =
|
|||
xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
|
||||
|
||||
[testenv:genconfig]
|
||||
basepython = python3
|
||||
description = Generates sample configuration file for monasca-api
|
||||
commands = oslo-config-generator --config-file=config-generator/monasca-api.conf
|
||||
|
||||
[testenv:genpolicy]
|
||||
basepython = python3
|
||||
description = Generates sample policy.json file for monasca-api
|
||||
commands = oslopolicy-sample-generator --config-file=config-generator/policy.conf
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:bindep]
|
||||
basepython = python3
|
||||
deps = bindep
|
||||
commands = bindep test
|
||||
|
||||
|
@ -178,7 +162,6 @@ import_exceptions =
|
|||
six.moves
|
||||
|
||||
[testenv:lower-constraints]
|
||||
basepython = python3
|
||||
deps =
|
||||
-c{toxinidir}/lower-constraints.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
|
Loading…
Reference in New Issue