From 4bdf6e69c75e58e90a003cbf3962102e0c52e097 Mon Sep 17 00:00:00 2001 From: Djailla Date: Mon, 18 Nov 2019 00:29:11 +0100 Subject: [PATCH] Remove py27 support deprecated in 2020 --- .travis.yml | 6 ++++-- gourde/gourde.py | 5 ++--- requirements.txt | 1 - setup.py | 1 - tox.ini | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index b7c05c0..f179e14 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,12 @@ language: python matrix: include: - - python: '3.5' + - python: 3.5 env: TOXENV=py35-coverage - - python: '3.6' + - python: 3.6 env: TOXENV=py36-coverage + - python: 3.7 + env: TOXENV=py37-coverage install: - pip install tox coveralls diff --git a/gourde/gourde.py b/gourde/gourde.py index 5f88cfa..4c0bc01 100644 --- a/gourde/gourde.py +++ b/gourde/gourde.py @@ -310,7 +310,6 @@ def run_with_gunicorn(self, **options): """Run with gunicorn.""" import gunicorn.app.base import multiprocessing - from six import iteritems class GourdeApplication(gunicorn.app.base.BaseApplication): @@ -320,9 +319,9 @@ def __init__(self, app, options=None): super(GourdeApplication, self).__init__() def load_config(self): - config = dict([(key, value) for key, value in iteritems(self.options) + config = dict([(key, value) for key, value in self.options.items() if key in self.cfg.settings and value is not None]) - for key, value in iteritems(config): + for key, value in config.items(): self.cfg.set(key.lower(), value) def load(self): diff --git a/requirements.txt b/requirements.txt index 0a7b94e..1041c0b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,6 @@ Flask prometheus_client prometheus-flask-exporter -six # For exception handling. blinker diff --git a/setup.py b/setup.py index 7d26fb1..db7f135 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,6 @@ def _read_reqs(relpath): 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', diff --git a/tox.ini b/tox.ini index 2500632..605991c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{27,35,36,37}-coverage,pylama +envlist = py{35,36,37}-coverage,pylama [testenv] commands =