From 2ceec3b348bb034935284033bde3c3be51f54651 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 4 Feb 2020 20:09:18 +0100 Subject: [PATCH] [ussuri][goal] Drop python 2.7 support and testing 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 Increase requests lower requirement since oslo.config needs 2.18.0. Fix idna lower-constraint to satisfy requests. Change-Id: I753e09613b50e099060e2c85eb80d06d8b257858 --- .zuul.yaml | 11 +++++------ doc/requirements.txt | 3 +-- lower-constraints.txt | 4 ++-- requirements.txt | 2 +- ...r-master.sh => run_py-tosca-parser-master.sh | 0 setup.cfg | 5 +++-- setup.py | 8 -------- tox.ini | 17 +++++++---------- 8 files changed, 19 insertions(+), 31 deletions(-) rename run_py27-tosca-parser-master.sh => run_py-tosca-parser-master.sh (100%) diff --git a/.zuul.yaml b/.zuul.yaml index 468ac0cb..a1cb3759 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -2,21 +2,20 @@ templates: - openstack-cover-jobs - openstack-lower-constraints-jobs - - openstack-python-jobs - openstack-python3-ussuri-jobs - publish-openstack-docs-pti - check-requirements check: jobs: - - heat-translator-tox-py27-tp: + - heat-translator-tox-py37-tp: voting: false - job: - name: heat-translator-tox-py27-tp - parent: openstack-tox + name: heat-translator-tox-py37-tp + parent: openstack-tox-py37 description: | Run tests for heat-translator project. - Uses tox with the ``py27-tp`` environment. + Uses tox with the ``py37-tp`` environment. vars: - tox_envlist: py27-tp + tox_envlist: py37-tp diff --git a/doc/requirements.txt b/doc/requirements.txt index c7b858be..1da7dc16 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,5 +2,4 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. openstackdocstheme>=1.20.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 +sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD diff --git a/lower-constraints.txt b/lower-constraints.txt index 44206794..9f6914d8 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -16,7 +16,7 @@ extras==1.0.0 fixtures==3.0.0 flake8==2.5.5 hacking==0.12.0 -idna==2.6 +idna==2.5 imagesize==0.7.1 iso8601==0.1.11 Jinja2==2.10 @@ -64,7 +64,7 @@ python-subunit==1.0.0 python-swiftclient==3.2.0 pytz==2013.6 PyYAML==3.12 -requests==2.14.2 +requests==2.18.0 requestsexceptions==1.2.0 simplejson==3.5.1 six==1.10.0 diff --git a/requirements.txt b/requirements.txt index 56267c02..b5832e0e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,6 @@ keystoneauth1>=3.4.0 # Apache-2.0 python-novaclient>=9.1.0 # Apache-2.0 python-heatclient>=1.10.0 # Apache-2.0 python-glanceclient>=2.8.0 # Apache-2.0 -requests>=2.14.2 # Apache-2.0 +requests>=2.18.0 # Apache-2.0 oslo.log>=3.36.0 # Apache-2.0 diff --git a/run_py27-tosca-parser-master.sh b/run_py-tosca-parser-master.sh similarity index 100% rename from run_py27-tosca-parser-master.sh rename to run_py-tosca-parser-master.sh diff --git a/setup.cfg b/setup.cfg index 7e6f0360..83f80e92 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,6 +6,7 @@ description-file = author = OpenStack author-email = openstack-discuss@lists.openstack.org home-page = http://docs.openstack.org/heat-translator/ +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,11 +14,11 @@ 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 + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: Implementation :: CPython [files] packages = diff --git a/setup.py b/setup.py index 566d8443..f63cc23c 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 50d5c247..0d33126e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,12 @@ [tox] -minversion = 2.0 -envlist = py27,py37,pep8 +minversion = 3.1.0 +envlist = py37,pep8 +ignore_basepython_conflict = true skipsdist = True [testenv] +basepython = python3 usedevelop = True -install_command = pip install {opts} {packages} setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning @@ -17,29 +18,25 @@ deps = commands = python setup.py test --slowest --testr-args='{posargs}' [testenv:pep8] -basepython = python3 commands = flake8 [testenv:venv] -basepython = python3 commands = {posargs} [testenv:cover] -basepython = python3 commands = python setup.py test --coverage --coverage-package-name=translator --testr-args='{posargs}' [testenv:docs] -basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -b html doc/source doc/build/html [testenv:debug] -basepython = python3 commands = oslo_debug_helper -t translator/tests {posargs} -[testenv:py27-tp] +[testenv:py37-tp] +basepython = python37 commands = - ./run_py27-tosca-parser-master.sh + ./run_py-tosca-parser-master.sh python setup.py test --slowest --testr-args='{posargs}' [flake8]