From 81e61c45fea8111ea9fbe64de6b21ea6e94422e5 Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 26 Jul 2023 20:27:33 +0200 Subject: [PATCH 1/3] Revert "CI: python 2.7 tests needs to run in a container (#5174)" This reverts commit 4f3cc168d1d519916dce345b965fa5854e822141. --- .github/workflows/scriptcheck.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/scriptcheck.yml b/.github/workflows/scriptcheck.yml index 13b87c37ff5..15495f3cea2 100644 --- a/.github/workflows/scriptcheck.yml +++ b/.github/workflows/scriptcheck.yml @@ -38,8 +38,6 @@ jobs: needs: build # 'ubuntu-22.04' removes Python 2.7, 3.5 and 3.6 so keep the previous LTS version runs-on: ubuntu-20.04 - container: - image: python:2.7.18-buster strategy: matrix: python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11'] From 7cae94363c7975f68a66753240fa05efff1489dd Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 26 Jul 2023 20:43:07 +0200 Subject: [PATCH 2/3] scriptcheck.yml: removed Python 2.7 (for now) --- .github/workflows/scriptcheck.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/scriptcheck.yml b/.github/workflows/scriptcheck.yml index 15495f3cea2..6ef6d90ee4c 100644 --- a/.github/workflows/scriptcheck.yml +++ b/.github/workflows/scriptcheck.yml @@ -37,10 +37,11 @@ jobs: needs: build # 'ubuntu-22.04' removes Python 2.7, 3.5 and 3.6 so keep the previous LTS version + # 'ubutunu-20.04' no longer works on 2.7 - TODO: re-added in a different way or remove support for it? runs-on: ubuntu-20.04 strategy: matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11'] + python-version: [3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11'] fail-fast: false steps: From de90bea084ea5c3df0041bc1bea5d073ab9acb0c Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 26 Jul 2023 20:43:56 +0200 Subject: [PATCH 3/3] misra_9.py: format strings are not supported until Python 3.6 --- addons/misra_9.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/misra_9.py b/addons/misra_9.py index 02940c440f7..f0f73371906 100644 --- a/addons/misra_9.py +++ b/addons/misra_9.py @@ -418,7 +418,7 @@ def misra_9_x(self, data, rule, rawTokens = None): has_var = True continue unknown_constant = True - cppcheckdata.reportError(sz, 'error', f'Unknown constant {t.str}, please review configuration', 'misra', 'config') + cppcheckdata.reportError(sz, 'error', 'Unknown constant {}, please review configuration'.format(t.str), 'misra', 'config') has_config_errors = True if t.isArithmeticalOp: tokens += [t.astOperand1, t.astOperand2]