diff --git a/setup.cfg b/setup.cfg index 9b2be1b..ac3c0b8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,12 +15,12 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 2.6 Programming Language :: Python :: 3 Programming Language :: Python :: 3.3 Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 Topic :: Utilities [files] diff --git a/setup.py b/setup.py index f8fcdec..4e7501e 100755 --- a/setup.py +++ b/setup.py @@ -16,14 +16,6 @@ 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>=1.3'], pbr=True) diff --git a/test-requirements.txt b/test-requirements.txt index e7171d9..601db9f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,12 +2,12 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking<0.11,>=0.10.0 +flake8 coverage>=3.6 python-subunit>=0.0.18 requests-mock>=0.6.0 -sphinx>=1.6.2 +sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD mock>=1.2 openstackdocstheme>=1.11.0 # Apache-2.0 oslotest>=1.2.0 # Apache-2.0 diff --git a/tests/cmd/test_delete.py b/tests/cmd/test_delete.py index ff94316..00df586 100644 --- a/tests/cmd/test_delete.py +++ b/tests/cmd/test_delete.py @@ -23,9 +23,9 @@ class TestCaseDelete(TestCase): def test_delete_without_path(self): required = [ - '.*?^usage: grafana-dashboards delete \[-h\] path', - '.*?^grafana-dashboards delete: error: (too few arguments|the ' - 'following arguments are required: path)', + r'.*?^usage: grafana-dashboards delete \[-h\] path', + r'.*?^grafana-dashboards delete: error: (too few arguments|the ' + r'following arguments are required: path)', ] stdout, stderr = self.shell('delete', exitcodes=[2]) for r in required: diff --git a/tests/cmd/test_update.py b/tests/cmd/test_update.py index 47af29b..7cac9b1 100644 --- a/tests/cmd/test_update.py +++ b/tests/cmd/test_update.py @@ -23,9 +23,9 @@ class TestCaseUpdate(TestCase): def test_update_without_path(self): required = [ - '.*?^usage: grafana-dashboards update \[-h\] path', - '.*?^grafana-dashboards update: error: (too few arguments|the ' - 'following arguments are required: path)', + r'.*?^usage: grafana-dashboards update \[-h\] path', + r'.*?^grafana-dashboards update: error: (too few arguments|the ' + r'following arguments are required: path)', ] stdout, stderr = self.shell('update', exitcodes=[2]) for r in required: diff --git a/tests/cmd/test_validate.py b/tests/cmd/test_validate.py index a76af05..7280326 100644 --- a/tests/cmd/test_validate.py +++ b/tests/cmd/test_validate.py @@ -102,7 +102,7 @@ class TestCaseValidate(TestCase): def _validate_invalid_file_or_directory(self, path): required = [ - '%s: ERROR: \[Errno 2\] No such file or directory:' % path, + r'%s: ERROR: \[Errno 2\] No such file or directory:' % path, ] stdout, stderr = self.shell( 'validate %s' % path, exitcodes=[1]) @@ -113,9 +113,9 @@ class TestCaseValidate(TestCase): def test_validate_without_path(self): required = [ - '.*?^usage: grafana-dashboards validate \[-h\] path', - '.*?^grafana-dashboards validate: error: (too few arguments|the ' - 'following arguments are required: path)', + r'.*?^usage: grafana-dashboards validate \[-h\] path', + r'.*?^grafana-dashboards validate: error: (too few arguments|the ' + r'following arguments are required: path)', ] stdout, stderr = self.shell('validate', exitcodes=[2]) for r in required: diff --git a/tests/cmd/test_version.py b/tests/cmd/test_version.py index 918dad5..30a03c2 100644 --- a/tests/cmd/test_version.py +++ b/tests/cmd/test_version.py @@ -23,4 +23,4 @@ class TestCaseVersion(TestCase): stdout, stderr = self.shell('--version') self.assertThat( (stdout + stderr), - matchers.MatchesRegex('.*?^(\d+)\.(\d+)\.(\d+)')) + matchers.MatchesRegex(r'.*?^(\d+)\.(\d+)\.(\d+)')) diff --git a/tox.ini b/tox.ini index 43226b3..32b6b7a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,8 @@ [tox] -minversion = 1.6 -envlist = docs,pep8,py27,py35 +minversion = 3.1.1 +envlist = docs,pep8,py35,py36,py37,py38 skipsdist = True +ignore_basepython_conflict = True [testenv] usedevelop = True @@ -13,22 +14,18 @@ deps = -r{toxinidir}/requirements.txt commands = python setup.py test --slowest --testr-args='{posargs}' [testenv:pep8] -basepython = python3 commands = flake8 [testenv:venv] -basepython = python3 commands = {posargs} [testenv:cover] -basepython = python3 commands = coverage erase python setup.py test --coverage --coverage-package-name=grafana_dashboards --testr-args='{posargs}' coverage report [testenv:docs] -basepython = python3 commands = python setup.py build_sphinx [flake8] @@ -36,6 +33,6 @@ commands = python setup.py build_sphinx # H202 skip until we actually write our own exceptions show-source = True -ignore = E123,E125,H202 +ignore = E123,E125,H202,W503 builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build