From c57f201c7cf8b0015c06e787f1d9875534f0422f Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Fri, 15 Nov 2019 16:30:31 +0000 Subject: [PATCH] [ussuri][goal] Drop python 2.7 support and testing OpenStack is dropping the py2.7 support in ussuri cycle. monasca-agent 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: I6cd8c92e4c7c9228ae14596e1535f40184a5ae22 --- .zuul.yaml | 3 --- .../notes/drop-py-2-7-9a5a1c167be90f99.yaml | 6 ++++++ requirements.txt | 1 - setup.cfg | 2 -- tox.ini | 15 ++------------- 5 files changed, 8 insertions(+), 19 deletions(-) create mode 100644 releasenotes/notes/drop-py-2-7-9a5a1c167be90f99.yaml diff --git a/.zuul.yaml b/.zuul.yaml index c87fd392..966b9888 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,12 +1,9 @@ - project: templates: - - openstack-python-jobs - openstack-python3-ussuri-jobs check: jobs: - build-monasca-docker-image - - monasca-tempest-python2-influxdb: - voting: false - monasca-tempest-python3-influxdb: voting: false post: diff --git a/releasenotes/notes/drop-py-2-7-9a5a1c167be90f99.yaml b/releasenotes/notes/drop-py-2-7-9a5a1c167be90f99.yaml new file mode 100644 index 00000000..2952fefa --- /dev/null +++ b/releasenotes/notes/drop-py-2-7-9a5a1c167be90f99.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. Last release of monasca-agent + to support python 2.7 is OpenStack Train. The minimum version of Python now + supported by monasca-agent is Python 3.6. diff --git a/requirements.txt b/requirements.txt index 61be734d..7a24a1b9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,7 +21,6 @@ redis>=2.10.0 # MIT six>=1.10.0 # MIT stevedore>=1.20.0 # Apache-2.0 tornado>=4.5.3 # Apache-2.0 -futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD # NOTE(sdague): before allowing in >= 0.21 please be sure # https://github.com/eventlet/eventlet/issues/401 is resolved eventlet!=0.18.3,!=0.20.1,>=0.18.2 # MIT diff --git a/setup.cfg b/setup.cfg index e17b5986..95d1db1a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,8 +16,6 @@ classifier= License :: OSI Approved :: Apache Software License Topic :: System :: Monitoring Operating System :: POSIX :: Linux - 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/tox.ini b/tox.ini index 4a14a9d1..1ffea0b7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,10 @@ [tox] -envlist = py27,py37,pep8,cover +envlist = py37,pep8,cover minversion = 2.5 skipsdist = True [testenv] +basepython = python3 usedevelop = True setenv = VIRTUAL_ENV={envdir} @@ -22,12 +23,6 @@ commands = find . -type f -name "*.pyc" -delete rm -Rf .testrepository/times.dbm -[testenv:py27] -basepython = python2.7 -commands = - {[testenv]commands} - stestr run {posargs} - [testenv:py36] basepython = python3.6 commands = @@ -35,7 +30,6 @@ commands = stestr run {posargs} [testenv:cover] -basepython = python3 commands = {[testenv]commands} coverage erase @@ -43,7 +37,6 @@ commands = coverage report [testenv:bandit] -basepython = python3 commands = # B101 - asserts used on purpose # Following rules should be fixed in future @@ -67,20 +60,17 @@ commands = bandit -r monasca_agent -n5 -s B101,B602,B603,B301,B303,B311,B403,B404,B405,B310,B320,B410,B411,B501,B504,B605,B607,B608 -x {toxinidir}/tests [testenv:flake8] -basepython = python3 commands = flake8 monasca_agent flake8 monasca_setup flake8 tests [testenv:pep8] -basepython = python3 commands = {[testenv:flake8]commands} {[testenv:bandit]commands} [testenv:venv] -basepython = python3 commands = {posargs} [testenv:bindep] @@ -88,7 +78,6 @@ commands = {posargs} # system dependencies are missing, since it's used to tell you what system # dependencies are missing! This also means that bindep must be installed # separately, outside of the requirements files. -basepython = python3 deps = bindep commands = bindep test