From 97db90165829098b6fcf9758913da0175a9f894f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 6 Feb 2020 18:52:50 +0100 Subject: [PATCH] [ussuri][goal] Finish dropping python 2.7 support OpenStack is dropping the py2.7 support in ussuri cycle. 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 This change cleans up: * remove old requirements * remove universal wheel building, we don't need this for py3 * cleanup setup.py * tox.ini: move basepython around; remove install_command since the default is fine and constraints should be in deps; add ignore_basepython_conflict Change-Id: Ife0a696ca62be21d3d93c5d8279a412578f62697 --- doc/requirements.txt | 3 +-- setup.cfg | 5 +---- setup.py | 8 -------- tox.ini | 25 ++++++++----------------- 4 files changed, 10 insertions(+), 31 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 286a4733fd..49b45a46a0 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -4,8 +4,7 @@ openstackdocstheme>=1.20.0 # Apache-2.0 os-api-ref>=1.4.0 # Apache-2.0 -sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD -sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD +sphinx>=1.8.0,!=2.1.0 # BSD reno>=2.5.0 # Apache-2.0 sphinxcontrib-apidoc>=0.2.0 # BSD sphinxcontrib-httpdomain>=1.3.0 # BSD diff --git a/setup.cfg b/setup.cfg index 43473c7c21..2c2f4a08bf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,6 +6,7 @@ description-file = author = OpenStack author-email = openstack-discuss@lists.openstack.org home-page = https://docs.openstack.org/heat/latest/ +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -198,10 +199,6 @@ heat.templates = heat_template_version.2018-08-31 = heat.engine.hot.template:HOTemplate20180831 heat_template_version.rocky = heat.engine.hot.template:HOTemplate20180831 -[global] -setup-hooks = - pbr.hooks.setup_hook - [compile_catalog] directory = heat/locale domain = heat diff --git a/setup.py b/setup.py index 566d84432e..f63cc23c52 100644 --- a/setup.py +++ b/setup.py @@ -16,14 +16,6 @@ # THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT import setuptools -# In python < 2.7.4, a lazy loading of package `pbr` will break -# setuptools if some other modules registered functions in `atexit`. -# solution from: http://bugs.python.org/issue15881#msg170215 -try: - import multiprocessing # noqa -except ImportError: - pass - setuptools.setup( setup_requires=['pbr>=2.0.0'], pbr=True) diff --git a/tox.ini b/tox.ini index 67bb89f3fc..736297877a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,15 +1,17 @@ [tox] envlist = py36,py37,pep8 -minversion = 1.6 +ignore_basepython_conflict = True +minversion = 3.1.0 skipsdist = True [testenv] +basepython = python3 setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning OS_TEST_PATH=heat/tests usedevelop = True -install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} -deps = -r{toxinidir}/requirements.txt +deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = stestr run {posargs} @@ -18,7 +20,6 @@ commands = passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:pep8] -basepython = python3 commands = flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-engine bin/heat-manage contrib heat_integrationtests doc/source python tools/custom_guidelines.py --exclude heat/engine/resources/aws @@ -39,11 +40,9 @@ commands = doc8 {posargs} [testenv:venv] -basepython = python3 commands = {posargs} [testenv:cover] -basepython = python3 setenv = PYTHON=coverage run --source heat --parallel-mode commands = @@ -55,7 +54,6 @@ commands = coverage report [testenv:docs] -basepython = python3 whitelist_externals = rm deps = -r{toxinidir}/doc/requirements.txt @@ -64,7 +62,6 @@ commands = sphinx-build -W --keep-going -b html doc/source doc/build/html [testenv:pdf-docs] -basepython = python3 deps = {[testenv:docs]deps} whitelist_externals = make @@ -73,7 +70,6 @@ commands = make -C doc/build/pdf [testenv:api-ref] -basepython = python3 # This environment is called from CI scripts to test and publish # the API Ref to docs.openstack.org. deps = -r{toxinidir}/doc/requirements.txt @@ -83,19 +79,18 @@ commands = sphinx-build -W --keep-going -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html [testenv:genconfig] -basepython = python3 commands = oslo-config-generator --config-file=config-generator.conf oslo-config-generator --config-file=heat_integrationtests/config-generator.conf [testenv:genpolicy] -basepython = python3 commands = oslopolicy-sample-generator --config-file etc/heat/heat-policy-generator.conf [testenv:bandit] -basepython = python3 -deps = -r{toxinidir}/test-requirements.txt +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/test-requirements.txt # The following bandit tests are being skipped: # B101: Test for use of assert # B104: Test for binding to all interfaces @@ -125,11 +120,9 @@ import_exceptions = heat.common.i18n local-check-factory = heat.hacking.checks.factory [testenv:debug] -basepython = python3 commands = oslo_debug_helper {posargs} [testenv:releasenotes] -basepython = python3 whitelist_externals = rm deps = -r{toxinidir}/doc/requirements.txt @@ -138,7 +131,6 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html [testenv:bindep] -basepython = python3 # Do not install any requirements. We want this to be fast and work even if # system dependencies are missing, since it's used to tell you what system # dependencies are missing! This also means that bindep must be installed @@ -150,7 +142,6 @@ commands = bindep test usedevelop = False [testenv:lower-constraints] -basepython = python3 install_command = pip install {opts} {packages} deps = -c{toxinidir}/lower-constraints.txt