From 8a9104bd400086403b65f54a76a4fea08c4b3423 Mon Sep 17 00:00:00 2001 From: Nicolas Trangez Date: Thu, 17 Dec 2020 10:42:29 +0000 Subject: [PATCH] tox: pin `basepython` to `python3.6` in `lint-python` A future commit updates the version of `pylint` we use to validate Python code, which does not work properly with Python 3.9 at the time of writing, which is the default Python on e.g., a Fedora 32 system. Instead, pin the Python version to the (Python 3) version as found on our target system(s), i.e., RHEL/CentOS 7, so Python 3.6. See: https://github.com/PyCQA/pylint/issues/3882 See: https://scality.slack.com/archives/CFXQQUDPT/p1608201195013900?thread_ts=1608200122.011200&cid=CFXQQUDPT --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index dccd43b0d7..1194acfa5f 100644 --- a/tox.ini +++ b/tox.ini @@ -82,6 +82,8 @@ commands = [testenv:lint-python] description = Lint Python files using pylint and mypy. +# Set Python version to Python3 as shipped with RHEL/CentOS 7 +basepython = python3.6 deps = -r{toxinidir}/buildchain/requirements-{env:OSTYPE}.txt -r{toxinidir}/buildchain/requirements-dev.txt