From 22ade4fa7748aa7c3895aa932f65be8b516900b0 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Wed, 30 Oct 2019 02:49:25 +0000 Subject: [PATCH] [ussuri][goal] Drop python 2.7 support and testing OpenStack is dropping the py2.7 support in ussuri cycle. Zaqar 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: I0fde9d2f16f3cc77be3d4cab482fa0fb7ab9e7fc --- .zuul.yaml | 3 +-- doc/requirements.txt | 1 - .../legacy/grenade-devstack-zaqar-base/run.yaml | 1 + playbooks/legacy/rally-dsvm-zaqar-zaqar/run.yaml | 2 +- .../legacy/tempest-devstack-zaqar-base/run.yaml | 1 + .../notes/drop-py-2-7-09cf95d7d843d8f6.yaml | 6 ++++++ requirements.txt | 2 -- setup.cfg | 2 -- tox.ini | 14 ++------------ 9 files changed, 12 insertions(+), 20 deletions(-) create mode 100644 releasenotes/notes/drop-py-2-7-09cf95d7d843d8f6.yaml diff --git a/.zuul.yaml b/.zuul.yaml index db97c29a7..c7d6237bb 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -111,8 +111,7 @@ templates: - check-requirements - openstack-lower-constraints-jobs - - openstack-python-jobs - - openstack-python3-train-jobs + - openstack-python3-ussuri-jobs - periodic-stable-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 diff --git a/doc/requirements.txt b/doc/requirements.txt index a80482018..24902f3d4 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,7 +2,6 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. openstackdocstheme>=1.18.1 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,>=1.6.3,<2.0.0;python_version=='2.7' # BSD sphinx!=1.6.6,!=1.6.7,>=1.6.3;python_version>='3.4' # BSD sphinxcontrib-apidoc>=0.2.0 # BSD reno>=2.5.0 # Apache-2.0 diff --git a/playbooks/legacy/grenade-devstack-zaqar-base/run.yaml b/playbooks/legacy/grenade-devstack-zaqar-base/run.yaml index 4b1136c8a..9fd95a661 100644 --- a/playbooks/legacy/grenade-devstack-zaqar-base/run.yaml +++ b/playbooks/legacy/grenade-devstack-zaqar-base/run.yaml @@ -32,6 +32,7 @@ enable_plugin zaqar https://opendev.org/openstack/zaqar # Enable Zaqar Tempest plugin TEMPEST_PLUGINS='/opt/stack/new/zaqar-tempest-plugin' + USE_PYTHON3="True" EOF executable: /bin/bash diff --git a/playbooks/legacy/rally-dsvm-zaqar-zaqar/run.yaml b/playbooks/legacy/rally-dsvm-zaqar-zaqar/run.yaml index 5528bbb56..102cb2c94 100644 --- a/playbooks/legacy/rally-dsvm-zaqar-zaqar/run.yaml +++ b/playbooks/legacy/rally-dsvm-zaqar-zaqar/run.yaml @@ -48,7 +48,7 @@ export DEVSTACK_GATE_EXERCISES=0 export DEVSTACK_GATE_PREPOPULATE_USERS=0 - export DEVSTACK_GATE_USE_PYTHON3=False + export DEVSTACK_GATE_USE_PYTHON3=True export USE_KEYSTONE_V2API=0 export RALLY_SCENARIO=$ZUUL_SHORT_PROJECT_NAME-zaqar diff --git a/playbooks/legacy/tempest-devstack-zaqar-base/run.yaml b/playbooks/legacy/tempest-devstack-zaqar-base/run.yaml index e06861749..cb89d2bbb 100644 --- a/playbooks/legacy/tempest-devstack-zaqar-base/run.yaml +++ b/playbooks/legacy/tempest-devstack-zaqar-base/run.yaml @@ -32,6 +32,7 @@ enable_plugin zaqar https://opendev.org/openstack/zaqar # Enable Zaqar Tempest plugin TEMPEST_PLUGINS='/opt/stack/new/zaqar-tempest-plugin' + USE_PYTHON3="True" EOF executable: /bin/bash diff --git a/releasenotes/notes/drop-py-2-7-09cf95d7d843d8f6.yaml b/releasenotes/notes/drop-py-2-7-09cf95d7d843d8f6.yaml new file mode 100644 index 000000000..6989395ee --- /dev/null +++ b/releasenotes/notes/drop-py-2-7-09cf95d7d843d8f6.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. Last release of Zaqar + to support py2.7 is OpenStack Train. The minimum version of Python now + supported by Zaqar is Python 3.6. diff --git a/requirements.txt b/requirements.txt index 10db9483e..f15ed952a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,8 +28,6 @@ oslo.utils>=3.33.0 # Apache-2.0 oslo.policy>=1.30.0 # Apache-2.0 osprofiler>=1.4.0 # Apache-2.0 SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8,>=1.0.10 # MIT -enum34>=1.0.4;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD -trollius>=2.1;python_version=='2.7' # Apache-2.0 autobahn>=0.17.1 # MIT License requests>=2.14.2 # Apache-2.0 futurist>=1.2.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index 460912945..33ffa71c7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,8 +13,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 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 diff --git a/tox.ini b/tox.ini index 04f2ba86e..f2edc28c8 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,10 @@ [tox] minversion = 2.0 -envlist = py27,py37,pep8 +envlist = py37,pep8 skipsdist = True [testenv] +basepython = python3 usedevelop = True install_command = pip install {opts} {packages} setenv = VIRTUAL_ENV={envdir} @@ -22,30 +23,25 @@ commands = whitelist_externals = find [testenv:integration] -basepython = python3 setenv = {[testenv]setenv} ZAQAR_TEST_INTEGRATION=1 OS_TEST_PATH=./zaqar/tests/functional commands = stestr run --serial --slowest {posargs} [testenv:pep8] -basepython = python3 commands = doc8 doc/source flake8 [testenv:genconfig] -basepython = python3 commands = oslo-config-generator --config-file etc/oslo-config-generator/zaqar.conf [testenv:genpolicy] -basepython = python3 commands = oslopolicy-sample-generator --config-file etc/zaqar-policy-generator.conf [testenv:cover] -basepython = python3 setenv = {[testenv]setenv} PYTHON=coverage run --source zaqar --parallel-mode @@ -56,11 +52,9 @@ commands = coverage xml -o cover/coverage.xml [testenv:venv] -basepython = python3 commands = {posargs} [testenv:docs] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt @@ -68,7 +62,6 @@ commands = sphinx-build -W -b html doc/source doc/build/html [testenv:api-ref] -basepython = python3 # This environment is called from CI scripts to test and publish # the API Ref to docs.openstack.org. # @@ -82,11 +75,9 @@ commands = sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html [testenv:debug] -basepython = python3 commands = oslo_debug_helper {posargs} [testenv:releasenotes] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt @@ -113,7 +104,6 @@ max-line-length = 80 local-check-factory = zaqar.hacking.checks.factory [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt