From 253b15cc334b8feced04ea5acb150d911451da5b Mon Sep 17 00:00:00 2001 From: Tin Lam Date: Wed, 31 Oct 2018 11:37:03 -0500 Subject: [PATCH] Remove py35 support As the default Docker image support for Pegleg is using py36 as a base image, this patch set simply removes the support for py35. This allows us to use py36 features such as secrets and f-strings without needing to cope with backward compatibility. Change-Id: Ic156ca67d2a0fe6fdc74c2c9da253a1cb8a3f456 Signed-off-by: Tin Lam --- .zuul.yaml | 1 - Makefile | 2 +- doc/source/developer-overview.rst | 11 +++++------ tox.ini | 31 ++++++++++++++++--------------- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 50c23ce7..870b68e7 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -12,7 +12,6 @@ - project: templates: - - openstack-python35-jobs - openstack-python36-jobs - openstack-cover-jobs check: diff --git a/Makefile b/Makefile index 5ede898f..9a70e451 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ security: # Run all unit tests under pegleg .PHONY: run_tests run_tests: - tox -e py35 + tox -e py36 # Perform Linting .PHONY: lint diff --git a/doc/source/developer-overview.rst b/doc/source/developer-overview.rst index c4c2671d..a1e5d086 100644 --- a/doc/source/developer-overview.rst +++ b/doc/source/developer-overview.rst @@ -72,8 +72,7 @@ Pegleg strives to conform to the `Airship coding conventions`_. Python ------ -The Pegleg code base lives under ``pegleg``. Pegleg supports py35 and py36 -interpreters. +The Pegleg code base lives under ``pegleg``. Pegleg supports py36 interpreter. Docker ------ @@ -103,8 +102,8 @@ directory): # Quick way of building a venv and installing all required dependencies into # it. - tox -e py35 --notest - source .tox/py35/bin/activate + tox -e py36 --notest + source .tox/py36/bin/activate pip install -e . # Now is it possible to run the Pegleg CLI to test local changes: @@ -129,11 +128,11 @@ Unit Tests To run all unit tests, execute:: - $ tox -epy35 + $ tox -epy36 To run unit tests using a regex, execute:: - $ tox -epy35 -- + $ tox -epy36 -- .. _Airship: https://airshipit.readthedocs.io .. _Deckhand: https://airship-deckhand.readthedocs.io/ diff --git a/tox.ini b/tox.ini index caa91d22..bb2ce13f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,19 +1,18 @@ [tox] -envlist = py35, py36, pep8, docs, cover +envlist = py36,pep8,docs,cover minversion = 2.3.1 -# Allows docs to be built without setup.py having to exist. Requires that -# usedevelop be False as well (which it is by default). skipsdist = True [testenv] -setenv = VIRTUAL_ENV={envdir} - LANGUAGE=en_US - LC_ALL=en_US.utf-8 -passenv = http_proxy https_proxy HTTP_PROXY HTTPS_PROXY +usedevelop = True +setenv = + VIRTUAL_ENV={envdir} + LANGUAGE=en_US + LC_ALL=en_US.utf-8 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -basepython=python3 +passenv = http_proxy https_proxy HTTP_PROXY HTTPS_PROXY no_proxy NO_PROXY PBR_VERSION whitelist_externals = find commands = @@ -21,19 +20,19 @@ commands = {toxinidir}/tools/gate/run-unit-tests.sh '{posargs}' [testenv:fmt] -basepython=python3 +basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands = yapf --style=pep8 -ir {toxinidir}/pegleg {toxinidir}/tests [testenv:pep8] -basepython=python3 +basepython = python3 deps = - -r{toxinidir}/test-requirements.txt + -r{toxinidir}/test-requirements.txt commands = - flake8 {toxinidir}/pegleg - bandit -r pegleg -n 5 + bandit -r pegleg -n 5 + flake8 {toxinidir}/pegleg [testenv:docs] basepython = python3 @@ -41,10 +40,12 @@ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = - {toxinidir}/tools/gate/build-docs.sh + bash -c "{toxinidir}/tools/gate/build-docs.sh" +whitelist_externals = + bash [testenv:bandit] -basepython=python3 +basepython = python3 commands = bandit -r pegleg -n 5 [testenv:cover]