summaryrefslogtreecommitdiff
path: root/test-requirements.txt
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2020-02-21 06:09:58 +0900
committerBrian Haley <bhaley@redhat.com>2020-05-12 16:58:41 -0400
commit52e3fee5ef5217eed5efcb2289b6171b5d26fef3 (patch)
tree9b8f2b51a35646949847688de11265ceac041639 /test-requirements.txt
parent08e9ec1b56889fa1d21d5c3ac1378fd20669d6a0 (diff)
downloadneutron-52e3fee5ef5217eed5efcb2289b6171b5d26fef3.tar.gz
Switch to hacking 3.0.1
In hacking 2.0 or later, local-check-factory was removed as it is not compatible with flake8 3.x and it is advised to use flake8's local plugins [1]. neutron-lib provided a factory to register common hacking rules, but it no longer works with hacking 2, so we need to define rules defined in neutron-lib as flake8 local check plugin [2] explicitly. This needs to be done in each neutron related project, so it is the downside of the migration to hacking 2.x (I explored a way to continue to use the factory but failed to find a good way to achieve this) but I believe it is good to migrate the newer libraries. * flake8ext decorator in neutron/hacking/checks.py is also replaced with hacking.core.flake8ext to avoid the copy-and-paste code. * neutron-lib dependency is updated as neutron-lib 2.3 added hacking 3 support. * Python modules related to coding style checks (listed in blacklist.txt in openstack/requirements repo) are dropped from lower-constraints.txt as they are not actually used in tests (other than pep8). * HackingDocTestCase is now converted into normal test cases. HackingDocTestCase depends on the internal of hacking and pycodestyle so it looks better to use normal style of writing tests. [1] https://docs.openstack.org/releasenotes/hacking/unreleased.html#relnotes-2-0-0 [2] https://flake8.pycqa.org/en/3.7.0/user/configuration.html#using-local-plugins Change-Id: I92cf50a84bb587a0649a7cffee15cce4ce37d086
Diffstat (limited to 'test-requirements.txt')
-rw-r--r--test-requirements.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/test-requirements.txt b/test-requirements.txt
index b3101e6ebf..6a8a310089 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,12 +1,11 @@
# The order of packages is significant, because pip processes them in the order
# 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.1,<3.1.0 # Apache-2.0
bandit!=1.6.0,>=1.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
flake8-import-order==0.12 # LGPLv3
-pycodestyle>=2.0.0 # MIT
python-subunit>=1.0.0 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
testresources>=2.0.0 # Apache-2.0/BSD