From 6c480c3d890a0d7863afdddcb99bbccfb2ae0cb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Fri, 17 Apr 2020 17:18:46 +0200 Subject: [PATCH] Cleanup py27 support Removes and/or replaces all mentions of py27. Cleans up obsolete requirements and their lower-constraints. Change-Id: Id43f1bbd6a454832ab8dbf003a058403f6b34b5d --- doc/source/contributor/running-tests.rst | 14 +++++++------- docker/collectd/Dockerfile.j2 | 7 +------ kolla/image/build.py | 2 +- lower-constraints.txt | 3 --- requirements.txt | 6 ------ setup.cfg | 8 +++----- setup.py | 9 --------- tox.ini | 1 - 8 files changed, 12 insertions(+), 38 deletions(-) diff --git a/doc/source/contributor/running-tests.rst b/doc/source/contributor/running-tests.rst index 5d30703be0..9adfca0a52 100644 --- a/doc/source/contributor/running-tests.rst +++ b/doc/source/contributor/running-tests.rst @@ -30,11 +30,11 @@ See the `unit testing `__ section of the Testing wiki page for more information. Following are some simple examples. -To run the Python 2.7 tests: +To run the Python 3.7 tests: .. code-block:: console - tox -e py27 + tox -e py37 To run the style tests: @@ -46,7 +46,7 @@ To run multiple tests separate items by commas: .. code-block:: console - tox -e py27,py37,pep8 + tox -e py37,pep8 Running a subset of tests ------------------------- @@ -59,27 +59,27 @@ To run the tests located only in the ``kolla/tests`` directory: .. code-block:: console - tox -e py27 kolla.tests + tox -e py37 kolla.tests To run the tests of a specific file say ``kolla/tests/test_set_config.py``: .. code-block:: console - tox -e py27 test_set_config + tox -e py37 test_set_config To run the tests in the ``ConfigFileTest`` class in the ``kolla/tests/test_set_config.py`` file: .. code-block:: console - tox -e py27 test_set_config.ConfigFileTest + tox -e py37 test_set_config.ConfigFileTest To run the ``ConfigFileTest.test_delete_path_not_exists`` test method in the ``kolla/tests/test_set_config.py`` file: .. code-block:: console - tox -e py27 test_set_config.ConfigFileTest.test_delete_path_not_exists + tox -e py37 test_set_config.ConfigFileTest.test_delete_path_not_exists Coverage Report Generation -------------------------- diff --git a/docker/collectd/Dockerfile.j2 b/docker/collectd/Dockerfile.j2 index aab38754f9..a1a958eb07 100644 --- a/docker/collectd/Dockerfile.j2 +++ b/docker/collectd/Dockerfile.j2 @@ -65,15 +65,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_arch =='x86_64' %} {% set collectd_packages = collectd_packages + [ 'collectd-hugepages', + 'collectd-pmu', 'collectd-rdt', 'collectd-turbostat' ] %} - - {% if distro_python_version.startswith('3') %} - {% set collectd_packages = collectd_packages + [ - 'collectd-pmu' - ] %} - {% endif %} {% endif %} {% if base_arch != 's390x' %} diff --git a/kolla/image/build.py b/kolla/image/build.py index abba38c0fe..cc3374d48b 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -732,7 +732,7 @@ class KollaWorker(object): self.conf.distro_python_version = "3.6" else: # Assume worst - self.conf.distro_python_version = "2.7" + self.conf.distro_python_version = "3.6" if self.conf.distro_package_manager is not None: package_manager = self.conf.distro_package_manager diff --git a/lower-constraints.txt b/lower-constraints.txt index 249e5e13c4..3b7fcf8531 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -39,7 +39,6 @@ monotonic==1.4 mox3==0.25.0 msgpack==0.5.6 munch==2.2.0 -netaddr==0.7.18 netifaces==0.10.6 openstacksdk==0.12.0 os-client-config==1.29.0 @@ -50,7 +49,6 @@ oslo.context==2.20.0 oslo.i18n==3.20.0 oslo.log==3.36.0 oslo.serialization==2.25.0 -oslo.utils==3.33.0 oslotest==3.2.0 packaging==17.1 pbr==2.0.0 @@ -77,7 +75,6 @@ PyYAML==3.10 requests==2.18.4 requestsexceptions==1.4.0 rfc3986==1.2.0 -setuptools==21.0 simplejson==3.13.2 six==1.10.0 smmap2==2.0.3 diff --git a/requirements.txt b/requirements.txt index 9159f31196..9d5bd1cf3c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,5 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. pbr!=2.1.0,>=2.0.0 # Apache-2.0 docker>=2.4.2 # Apache-2.0 Jinja2>=2.8 # BSD License (3 clause) GitPython>=1.0.1 # BSD License (3 clause) oslo.config>=5.1.0 # Apache-2.0 -oslo.utils>=3.33.0 # Apache-2.0 -setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,!=36.2.0,>=21.0 # PSF/ZPL -netaddr>=0.7.18 # BSD diff --git a/setup.cfg b/setup.cfg index 1116c2e621..39a3732968 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/kolla/latest/ +python-requires = >=3.6 license = Apache License, Version 2.0 classifier = Environment :: OpenStack @@ -14,6 +15,8 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 @@ -36,8 +39,3 @@ console_scripts = kolla-build = kolla.cmd.build:main oslo.config.opts = kolla = kolla.opts:list_opts - -[build_releasenotes] -all_files = 1 -build-dir = releasenotes/build -source-dir = releasenotes/source diff --git a/setup.py b/setup.py index 566d84432e..cd35c3c35b 100644 --- a/setup.py +++ b/setup.py @@ -13,17 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# 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 fa71e42639..479cdf629e 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,6 @@ basepython = python3 usedevelop=True whitelist_externals = find rm -install_command = pip install {opts} {packages} deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt