From 4838541e9874be498f2298bee580b8f8057c5990 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 2 Apr 2020 14:57:45 +0200 Subject: [PATCH] Update hacking for Python3 The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Remove hacking and friends from lower-constraints, they are not needed for installation. Change-Id: I76369aad2778418182eab7c3eaf331b8d6b8fb1d --- lower-constraints.txt | 4 ---- oslo_reports/tests/test_guru_meditation_report.py | 2 +- test-requirements.txt | 2 +- tox.ini | 3 ++- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 81e190d..2ebd60f 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -9,11 +9,9 @@ dulwich==0.15.0 eventlet==0.18.2 extras==1.0.0 fixtures==3.0.0 -flake8==2.5.5 gitdb==0.6.4 GitPython==1.0.1 greenlet==0.4.10 -hacking==0.12.0 imagesize==0.7.1 iso8601==0.1.11 Jinja2==2.10 @@ -34,9 +32,7 @@ oslo.serialization==2.18.0 oslo.utils==3.33.0 oslotest==3.2.0 pbr==2.0.0 -pep8==1.5.7 psutil==3.2.2 -pyflakes==0.8.1 Pygments==2.2.0 pyparsing==2.1.0 python-mimeparse==1.6.0 diff --git a/oslo_reports/tests/test_guru_meditation_report.py b/oslo_reports/tests/test_guru_meditation_report.py index 8cdb26b..08024a5 100644 --- a/oslo_reports/tests/test_guru_meditation_report.py +++ b/oslo_reports/tests/test_guru_meditation_report.py @@ -147,7 +147,7 @@ class TestGuruMeditationReport(base.BaseTestCase): curr_line += len(target_str_p_head) # followed by at least one process - self.assertTrue(re.match("Process \d+ \(under \d+\)", + self.assertTrue(re.match(r"Process \d+ \(under \d+\)", report_lines[curr_line])) # followed by some more process stuff diff --git a/test-requirements.txt b/test-requirements.txt index dd7410a..7207aba 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=1.1.0,<1.2.0 # Apache-2.0 +hacking>=3.0,<3.1.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 59c6ac3..d9bea3f 100644 --- a/tox.ini +++ b/tox.ini @@ -38,8 +38,9 @@ commands = python setup.py test --coverage --coverage-package-name=oslo_reports [flake8] # E123, E125 skipped as they are invalid PEP-8. +# W504 line break after binary operator show-source = True -ignore = E123,E125 +ignore = E123,E125,W504 builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build