jenkins-bot submitted this change.

View Change


Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[tests] Update flake tests on jenkins CI

Backport change from master to tests.

several flake8 modules fails with new flake8 6.0.0
which needs Python 3.8.1. Jenkins CI does not reflect
the right Python version. Therefore only add quotes check
for Python < 3.8 which uses flake8 5.0.4.

- Use flake8-quotes with Python < 3.8 only
- Adjust flake8-quotes to >=3.3.0
- Adjust importlib-mtadata for Python < 3.8
- Test flake8 and hacking for the lowest and highest available Python

Bug: T323799
Bug: T323752
Change-Id: Ie00f8d0c8ec19b1174b880b1e7024b2bd0342520
---
M setup.py
M tox.ini
2 files changed, 31 insertions(+), 5 deletions(-)

diff --git a/setup.py b/setup.py
index f6ecef0..aac66f2 100755
--- a/setup.py
+++ b/setup.py
@@ -62,7 +62,9 @@
'flake8-docstrings>=1.3.1',
'verve-flake8-mock>=0.4',
'flake8-print>=2.0.1',
- 'flake8-quotes>=2.0.1',
+ # flake8-quotes is incompatible with flake8 6 (T323752),
+ # jenkins CI ignores "3.8.1"
+ 'flake8-quotes>=3.3.0; python_version < "3.8"',
'flake8-string-format',
'flake8-tuple>=0.2.8',
'flake8-no-u-prefixed-strings>=0.2',
@@ -72,8 +74,8 @@
'hacking': [
'hacking',
# importlib-metadata module already installed with hacking 4.1.0
- # but importlib-metadata 5.0.0 fails, so adjust it
- 'importlib-metadata!=5.0.0',
+ # but importlib-metadata 5 fails, so adjust it
+ 'importlib-metadata<5.0.0; python_version < "3.8"',
],
}

diff --git a/tox.ini b/tox.ini
index 69ebd75..4f85c2b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,8 +5,8 @@
skip_missing_interpreters = True
envlist =
commit-message
- flake8-{py39,py38,py36}
- hacking-py37
+ flake8-{py36,py39}
+ hacking-{py36,py39}

[params]
# gui needs tkinter
@@ -28,6 +28,7 @@
PYWIKIBOT_TEST_RUNNING=1
usedevelop = True
commands =
+ python --version
flake8: flake8 --version
flake8-py36: flake8 --doctests {posargs} {[params]exclude}
flake8-py38: flake8 --doctests {posargs}

To view, visit change 860845. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: tests
Gerrit-Change-Id: Ie00f8d0c8ec19b1174b880b1e7024b2bd0342520
Gerrit-Change-Number: 860845
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged