From 4cfaadec59021c8e3f6a12d790204cfb0c744286 Mon Sep 17 00:00:00 2001
From: "Dr. Jens Harbott" <harbott@osism.tech>
Date: Thu, 7 Apr 2022 11:02:22 +0200
Subject: [PATCH] Move lint requirements to dedicated file

These are not needed for unit tests and we want to avoid conflicts when
running with older python versions that we still test against.

We intentionally duplicate ansible and reno as requirements in order to
avoid having to install more items than necessary.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I0ec83c3e4ae38f911b922a3bade65429d91169eb
---
 lint-requirements.txt | 8 ++++++++
 test-requirements.txt | 8 --------
 tox.ini               | 3 +--
 3 files changed, 9 insertions(+), 10 deletions(-)
 create mode 100644 lint-requirements.txt

diff --git a/lint-requirements.txt b/lint-requirements.txt
new file mode 100644
index 0000000000..3d0d656b86
--- /dev/null
+++ b/lint-requirements.txt
@@ -0,0 +1,8 @@
+ansible>=4,<6 # GPLv3
+ansible-lint>=4.2.0,!=4.3.0,<6.0.0 # MIT
+bandit>=1.1.0 # Apache-2.0
+bashate>=0.5.1 # Apache-2.0
+doc8>=0.6.0 # Apache-2.0
+hacking>=3.0.1,<3.1.0 # Apache-2.0
+reno>=3.1.0 # Apache-2.0
+yamllint>=1.22.0 #GPL3
diff --git a/test-requirements.txt b/test-requirements.txt
index 4176d01605..76b4eba12a 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,11 +1,3 @@
-# linting
-ansible-lint>=4.2.0,!=4.3.0,<6.0.0 # MIT
-bandit>=1.1.0 # Apache-2.0
-bashate>=0.5.1 # Apache-2.0
-doc8>=0.6.0 # Apache-2.0
-hacking>=3.0.1,<3.1.0 # Apache-2.0
-yamllint>=1.22.0 #GPL3
-
 # coverage testing
 coverage!=4.4,>=4.0 # Apache-2.0
 
diff --git a/tox.ini b/tox.ini
index 9bf07e99c0..1f85daf106 100644
--- a/tox.ini
+++ b/tox.ini
@@ -93,8 +93,7 @@ setenv =
   ANSIBLE_FILTER_PLUGINS = {toxinidir}/ansible/filter_plugins
 deps =
   -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-  -r{toxinidir}/test-requirements.txt
-  -r{toxinidir}/doc/requirements.txt
+  -r{toxinidir}/lint-requirements.txt
 allowlist_externals = bash
                       find
 commands =