diff --git a/.zuul.yaml b/.zuul.yaml index 818f55d3328..b45583b1a9a 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,12 +1,10 @@ - project: templates: - openstack-lower-constraints-jobs - - openstack-python-jobs - openstack-python3-ussuri-jobs - publish-openstack-docs-pti - periodic-stable-jobs - check-requirements - - integrated-gate - integrated-gate-storage - release-notes-jobs-python3 check: @@ -24,6 +22,8 @@ - ^contrib/block-box.*$ - ^doc/.*$ - ^releasenotes/.*$ + - openstack-tox-functional-py37: + irrelevant-files: *functional-irrelevant-files - cinder-rally-task: voting: false - openstack-tox-pylint: @@ -48,9 +48,6 @@ - ^setup.cfg$ - ^tools/.*$ - ^tox.ini$ - - openstack-tox-functional: - voting: false - irrelevant-files: *functional-irrelevant-files - legacy-grenade-dsvm-cinder-mn-sub-volbak: irrelevant-files: *gate-irrelevant-files - legacy-tempest-dsvm-lvm-multibackend: @@ -61,8 +58,6 @@ irrelevant-files: *gate-irrelevant-files - tempest-slow-py3: irrelevant-files: *gate-irrelevant-files - - tempest-full: - irrelevant-files: *gate-irrelevant-files - tempest-integrated-storage: irrelevant-files: *gate-irrelevant-files - grenade-py3: @@ -73,8 +68,6 @@ jobs: - legacy-grenade-dsvm-cinder-mn-sub-volbak: irrelevant-files: *gate-irrelevant-files - - tempest-full: - irrelevant-files: *gate-irrelevant-files - tempest-integrated-storage: irrelevant-files: *gate-irrelevant-files - grenade-py3: diff --git a/playbooks/legacy/cinder-tempest-dsvm-lvm-lio-barbican/run.yaml b/playbooks/legacy/cinder-tempest-dsvm-lvm-lio-barbican/run.yaml index f2ee957b927..98e7b1d28d8 100644 --- a/playbooks/legacy/cinder-tempest-dsvm-lvm-lio-barbican/run.yaml +++ b/playbooks/legacy/cinder-tempest-dsvm-lvm-lio-barbican/run.yaml @@ -54,6 +54,7 @@ # pip for stable branches. export DEVSTACK_PROJECT_FROM_GIT=os-brick fi + export DEVSTACK_GATE_USE_PYTHON3=True export DEVSTACK_GATE_TEMPEST=1 export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1 # As we are setting DEVSTACK_GATE_TEMPEST_ALL_PLUGINS, we need to add diff --git a/releasenotes/notes/drop-py2-377a91a5b66165ab.yaml b/releasenotes/notes/drop-py2-377a91a5b66165ab.yaml new file mode 100644 index 00000000000..efc998f23d0 --- /dev/null +++ b/releasenotes/notes/drop-py2-377a91a5b66165ab.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. The last release of Cinder to support + py2.7 is OpenStack Train. The minimum version of Python now supported by + Cinder is Python 3.6. diff --git a/setup.cfg b/setup.cfg index 28525ee964e..29ea5f314f1 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 4b0141e3363..0f0106136cd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,15 @@ [tox] -minversion = 2.5 +minversion = 3.1.0 skipsdist = True skip_missing_interpreters = true -envlist = py37,py27,compliance,pep8 +# python runtimes: https://governance.openstack.org/tc/reference/runtimes/ussuri.html +envlist = py37,py36,compliance,pep8 +# this allows tox to infer the base python from the environment name +# and override any basepython configured in this file +ignore_basepython_conflict=true [testenv] +basepython = python3 setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning OS_STDOUT_CAPTURE=1 @@ -33,7 +38,6 @@ whitelist_externals = passenv = *_proxy *_PROXY [testenv:api-ref] -basepython = python3 whitelist_externals = rm deps = {[testenv:docs]deps} commands = @@ -41,7 +45,6 @@ commands = sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html/ [testenv:releasenotes] -basepython = python3 deps = {[testenv:docs]deps} commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html @@ -68,12 +71,10 @@ commands = stestr slowest [testenv:compliance] -basepython = python3 setenv = OS_TEST_PATH = ./cinder/tests/compliance [testenv:pep8] -basepython = python3 commands = flake8 {posargs} . doc8 @@ -81,7 +82,6 @@ commands = {toxinidir}/tools/check_exec.py {toxinidir}/cinder {toxinidir}/doc/source/ {toxinidir}/releasenotes/notes [testenv:fast8] -basepython = python3 # Use same environment directory as pep8 env to save space and install time envdir = {toxworkdir}/pep8 commands = @@ -89,7 +89,6 @@ commands = passenv = FAST8_NUM_COMMITS [testenv:pylint] -basepython = python3 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt pylint==2.3.0 @@ -99,7 +98,6 @@ commands = [testenv:cover] # Also do not run test_coverage_ext tests while gathering coverage as those # tests conflict with coverage. -basepython = python3 setenv = {[testenv]setenv} PYTHON=coverage run --source cinder --parallel-mode @@ -110,28 +108,23 @@ commands = coverage xml -o cover/coverage.xml [testenv:genconfig] -basepython = python3 sitepackages = False envdir = {toxworkdir}/pep8 commands = oslo-config-generator --config-file=tools/config/cinder-config-generator.conf [testenv:genpolicy] -basepython = python3 commands = oslopolicy-sample-generator --config-file=tools/config/cinder-policy-generator.conf [testenv:genopts] -basepython = python3 sitepackages = False envdir = {toxworkdir}/pep8 commands = python tools/config/generate_cinder_opts.py [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 @@ -142,7 +135,6 @@ commands = whitelist_externals = rm [testenv:pdf-docs] -basepython = python3 deps = {[testenv:docs]deps} commands = rm -fr doc/source/contributor/api/ @@ -154,18 +146,15 @@ whitelist_externals = rm [testenv:gendriverlist] -basepython = python3 sitepackages = False envdir = {toxworkdir}/venv commands = python {toxinidir}/tools/generate_driver_list.py [testenv:bandit] -basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands = bandit -r cinder -n5 -x cinder/tests/* -ll [testenv:bandit-baseline] -basepython = python3 envdir = {toxworkdir}/bandit commands = bandit-baseline -r cinder -n5 -x cinder/tests/* -ii -ll @@ -176,7 +165,6 @@ commands = bandit-baseline -r cinder -n5 -x cinder/tests/* -ii -ll # separately, outside of the requirements files, and develop mode disabled # explicitly to avoid unnecessarily installing the checked-out repo too (this # further relies on "tox.skipsdist = True" above). -basepython = python3 deps = bindep commands = bindep test usedevelop = False @@ -211,12 +199,10 @@ local-check-factory = cinder.tests.hacking.checks.factory import_exceptions = cinder.i18n [doc8] - ignore-path=.tox,*.egg-info,doc/src/api,doc/source/drivers.rst,doc/build,.eggs/*/EGG-INFO/*.txt,doc/source/configuration/tables,./*.txt extension=.txt,.rst,.inc [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt