diff --git a/.zuul.yaml b/.zuul.yaml index 371eb2c..78e61df 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,6 +1,5 @@ - project: templates: - - openstack-python-jobs - openstack-python3-ussuri-jobs - check-requirements - publish-openstack-docs-pti diff --git a/doc/requirements.txt b/doc/requirements.txt index a4a14cf..c75634f 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -3,7 +3,6 @@ # 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.2,<2.0.0;python_version=='2.7' # BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD reno>=2.5.0 # Apache-2.0 sphinxcontrib-httpdomain>=1.3.0 # BSD diff --git a/lower-constraints.txt b/lower-constraints.txt index 60d6b5b..63cf6f2 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -26,7 +26,6 @@ keystoneauth1==3.4.0 linecache2==1.0.0 MarkupSafe==1.0 mccabe==0.2.1 -mock==2.0.0 monotonic==0.6 msgpack-python==0.4.0 munch==2.1.0 diff --git a/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml b/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml new file mode 100644 index 0000000..1d442f6 --- /dev/null +++ b/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. The minimum version of Python now + supported by heat-agents is Python 3.6. diff --git a/setup.cfg b/setup.cfg index 9411f7b..9360643 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 @@ -13,16 +14,8 @@ 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 - -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 - -[upload_sphinx] -upload-dir = doc/build/html + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: Implementation :: CPython diff --git a/setup.py b/setup.py index 566d844..f63cc23 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/test-requirements.txt b/test-requirements.txt index ae0d0ac..2ccb3c7 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,7 +5,6 @@ coverage!=4.4,>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD # Hacking already pins down pep8, pyflakes and flake8 hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 -mock>=2.0.0 # BSD paunch>=4.0.0 # Apache-2.0 requests>=2.14.2 # Apache-2.0 requests-mock>=1.1.0 # Apache-2.0 diff --git a/tests/test_heat_config_notify.py b/tests/test_heat_config_notify.py index 9662f45..2806540 100644 --- a/tests/test_heat_config_notify.py +++ b/tests/test_heat_config_notify.py @@ -16,8 +16,8 @@ import json import tempfile import fixtures -import mock import six +from unittest import mock from tests import common from tests import heat_config_notify as hcn diff --git a/tests/test_hook_chef.py b/tests/test_hook_chef.py index 0bc4bab..8147925 100644 --- a/tests/test_hook_chef.py +++ b/tests/test_hook_chef.py @@ -15,9 +15,9 @@ import copy import imp import json import logging -import mock import six import sys +from unittest import mock from tests import common diff --git a/tests/test_hook_docker_cmd.py b/tests/test_hook_docker_cmd.py index 41d9dde..4b11e28 100644 --- a/tests/test_hook_docker_cmd.py +++ b/tests/test_hook_docker_cmd.py @@ -13,8 +13,8 @@ import json -import mock from six.moves import cStringIO as StringIO +from unittest import mock from tests import common from tests import hook_docker_cmd diff --git a/tests/test_hook_kubelet.py b/tests/test_hook_kubelet.py index 37b734e..4b4c0ca 100644 --- a/tests/test_hook_kubelet.py +++ b/tests/test_hook_kubelet.py @@ -12,9 +12,9 @@ # under the License. -import mock import re import testtools +from unittest import mock from tests import hook_kubelet diff --git a/tox.ini b/tox.ini index 908378d..2b951a5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,28 +1,27 @@ [tox] -envlist = py27,py37,pep8 -minversion = 1.6 +envlist = py37,pep8 +ignore_basepython_conflict = true +minversion = 3.1.0 skipsdist = True [testenv] +basepython = python3 whitelist_externals = bash setenv = VIRTUAL_ENV={envdir} -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 = bash -c 'if [ ! -d ./.testrepository ] ; then testr init ; fi' testr run {posargs} [testenv:pep8] -basepython = python3 commands = flake8 [testenv:docs] -basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html [testenv:venv] -basepython = python3 commands = {posargs} [flake8] @@ -31,12 +30,10 @@ builtins = _ exclude=.venv,.git,.tox,*lib/python*,private,.eggs [testenv:releasenotes] -basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt