From 5a70da1ad12f96ffda6149fbb528a7a1512cc0e2 Mon Sep 17 00:00:00 2001 From: Anton B Date: Wed, 12 Aug 2020 15:15:49 +0100 Subject: [PATCH] support python < 3.6 (#78) Co-authored-by: Anton Benkevich --- .travis.yml | 9 ++++++--- almdrlib/__init__.py | 2 ++ almdrlib/client.py | 2 +- almdrlib/config.py | 2 +- almdrlib/constants.py | 2 +- almdrlib/exceptions.py | 2 +- almdrlib/region.py | 2 +- almdrlib/session.py | 2 +- requirements.txt | 1 + requirements_dev.txt | 1 + setup.py | 4 +++- tests/test_open_api_support.py | 2 ++ tox.ini | 7 ++++--- 13 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 432efa8..9b20da3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: python jobs: include: - stage: test - python: 3.8 + python: 3.5 install: pip install -U tox-travis script: tox - python: 3.6 @@ -11,8 +11,11 @@ jobs: - python: 3.7 install: pip install -U tox-travis script: tox - - stage: test_doc - python: 3.8 + - python: 3.8 + install: pip install -U tox-travis + script: tox + - python: 3.8 + name: 'Test documentation build' install: pip install -r docs/requirements.txt script: cd docs; make html - stage: deploy diff --git a/almdrlib/__init__.py b/almdrlib/__init__.py index 9728128..1b845ec 100644 --- a/almdrlib/__init__.py +++ b/almdrlib/__init__.py @@ -1,3 +1,5 @@ +# -*- coding: future_fstrings -*- + __author__ = 'Alert Logic, Inc.' import logging diff --git a/almdrlib/client.py b/almdrlib/client.py index 1e4fd3e..de5e665 100644 --- a/almdrlib/client.py +++ b/almdrlib/client.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: future_fstrings -*- """ almdrlib.client diff --git a/almdrlib/config.py b/almdrlib/config.py index 28ef05c..36a4883 100644 --- a/almdrlib/config.py +++ b/almdrlib/config.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: future_fstrings -*- import os.path import configparser diff --git a/almdrlib/constants.py b/almdrlib/constants.py index f5ade39..c78cab9 100644 --- a/almdrlib/constants.py +++ b/almdrlib/constants.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: future_fstrings -*- import os.path diff --git a/almdrlib/exceptions.py b/almdrlib/exceptions.py index ea9d51b..c3c07a4 100644 --- a/almdrlib/exceptions.py +++ b/almdrlib/exceptions.py @@ -1,4 +1,4 @@ -# coding: utf-8 +# -*- coding: future_fstrings -*- """ almdrlib Exceptions diff --git a/almdrlib/region.py b/almdrlib/region.py index 7f12b70..ffb146a 100644 --- a/almdrlib/region.py +++ b/almdrlib/region.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: future_fstrings -*- from enum import Enum diff --git a/almdrlib/session.py b/almdrlib/session.py index 36a1b68..2137d6b 100644 --- a/almdrlib/session.py +++ b/almdrlib/session.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: future_fstrings -*- """ almdrlib.session diff --git a/requirements.txt b/requirements.txt index 2ff9ca0..7451b97 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ configparser==4.0.2 pyyaml==5.1.2 jsonschema[format_nongpl]==3.2.0 git+https://github.com/crossnox/m2r@dev#egg=m2r +future_fstrings \ No newline at end of file diff --git a/requirements_dev.txt b/requirements_dev.txt index b339016..629ef8a 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -15,3 +15,4 @@ sphinx_rtd_theme==0.4.3 sphinxcontrib_contentui==0.2.4 sphinx-paramlinks==0.4.1 git+https://github.com/crossnox/m2r@dev#egg=m2r +future_fstrings \ No newline at end of file diff --git a/setup.py b/setup.py index 329da06..5ff7f6b 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ 'pyyaml==5.1.2', 'jsonschema[format_nongpl]==3.2.0', 'm2r==0.2.1', + 'future_fstrings', definitions_dependency ] @@ -38,7 +39,7 @@ license='MIT license', author='Alert Logic Inc.', author_email='devsupport@alertlogic.com', - python_requires='>=3.6', + python_requires='>=3.5', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', @@ -47,6 +48,7 @@ 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX', + 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8' diff --git a/tests/test_open_api_support.py b/tests/test_open_api_support.py index 1810ffe..7346e48 100644 --- a/tests/test_open_api_support.py +++ b/tests/test_open_api_support.py @@ -1,4 +1,6 @@ #!/usr/bin/env python +# -*- coding: future_fstrings -*- + import os import json diff --git a/tox.ini b/tox.ini index 0b1eb13..8aec464 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,12 @@ [tox] -envlist = py36, py37, py38, flake8 +envlist = py35, py36, py37, py38, flake8 [travis] python = - 3.8: py38 - 3.7: py37 + 3.5: py35 3.6: py36 + 3.7: py37 + 3.8: py38 [testenv:flake8] basepython = python