From 83bc574ba525cba8e16a82c9fac9a7d6ee1c38b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Fri, 17 Apr 2020 18:03:38 +0200 Subject: [PATCH] Cleanup py27 support Removes and/or replaces all mentions of py27. Cleans up obsolete requirements and their lower-constraints. Update cliff minimum to 3.1.0 in requirements.txt, which has a fix for story 2005891. Change-Id: I52cffa2f1aee944f79c4618ea20b779755792f2a --- .travis.yml | 41 ------------------------------ doc/source/development/testing.rst | 2 +- requirements.txt | 9 ++----- setup.cfg | 9 +++---- setup.py | 9 ------- tox.ini | 1 - 6 files changed, 7 insertions(+), 64 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index af890d3e3..000000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -language: python -python: "2.7" - -# Run jobs in VMs - sudo is required by ansible tests. -sudo: required - -# Install ansible -addons: - apt: - packages: - - gcc - - python-apt - - python-virtualenv - - realpath - -# Create a build matrix for the different test jobs. -env: - matrix: - # Run python style checks. - - TOX_ENV=pep8 - # Build documentation. - - TOX_ENV=docs - # Run python2.7 unit tests. - - TOX_ENV=py27 - # Run ansible syntax checks. - - TOX_ENV=ansible-syntax - # Run ansible tests. - - TOX_ENV=ansible - # Run molecule tests. - - TOX_ENV=molecule - -install: - # Install tox in a virtualenv to ensure we have an up to date version. - - virtualenv venv - - venv/bin/pip install -U pip - - venv/bin/pip install tox - -script: - # Run the tox environment. - - venv/bin/tox -e ${TOX_ENV} diff --git a/doc/source/development/testing.rst b/doc/source/development/testing.rst index 9cdb7b8f7..38513f7c4 100644 --- a/doc/source/development/testing.rst +++ b/doc/source/development/testing.rst @@ -89,7 +89,7 @@ molecule Run Ansible tests for some Ansible roles using the molecule test framework. pep8 Run style checks for all shell, python and documentation files. -py27,py34 +py3 Run python unit tests for kayobe python module. Writing Tests diff --git a/requirements.txt b/requirements.txt index 79e4c41b7..d400ad305 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,6 @@ -# 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.0 # Apache-2.0 ansible>=2.8.0,<2.10.0,!=2.8.9 # GPLv3 -cliff>=2.5.0,<2.15.0 # Apache +cliff>=3.1.0 # Apache netaddr!=0.7.16,>=0.7.13 # BSD PyYAML>=3.10.0 # MIT -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,>=16.0 # PSF/ZPL -selinux;python_version>='3' # MIT +selinux # MIT diff --git a/setup.cfg b/setup.cfg index 3092250b8..c3839f109 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,6 +6,8 @@ description-file = author = OpenStack author-email = openstack-discuss@lists.openstack.org home-page = https://docs.openstack.org/kayobe/latest/ +python-requires = >=3.6 +license = Apache License, Version 2.0 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,20 +15,17 @@ 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 -# In below section we have to include the roles directory explicitly -# to Workaround PBR bug: -# source prefix replaced globally, see: -# https://bugs.launchpad.net/pbr/+bug/1810804 [files] packages = kayobe data_files = share/kayobe/ansible = ansible/* - share/kayobe/ansible/roles = ansible/roles/* share/kayobe/doc = doc/* share/kayobe/etc_examples = etc/* share/kayobe = setup.cfg diff --git a/setup.py b/setup.py index 8577899d1..0ef354679 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'], pbr=True) diff --git a/tox.ini b/tox.ini index a8519acfa..76c1f771c 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,6 @@ ignore_basepython_conflict = True [testenv] basepython = python3 usedevelop = True -install_command = pip install {opts} {packages} passenv = HOME whitelist_externals =