diff --git a/.github/workflows/scriptcheck.yml b/.github/workflows/scriptcheck.yml index 5f702f2fb22..8e6d4859157 100644 --- a/.github/workflows/scriptcheck.yml +++ b/.github/workflows/scriptcheck.yml @@ -17,7 +17,7 @@ permissions: jobs: build: - # 'ubuntu-22.04' removes Python 2.7, 3.6 and 3.6 so keep the previous LTS version + # 'ubuntu-22.04' removes Python 3.5 and 3.6 so keep the previous LTS version runs-on: ubuntu-20.04 steps: @@ -43,8 +43,7 @@ jobs: scriptcheck: 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? + # 'ubuntu-22.04' removes Python 3.5 and 3.6 so keep the previous LTS version runs-on: ubuntu-20.04 strategy: matrix: @@ -75,16 +74,7 @@ jobs: sudo apt-get update sudo apt-get install tidy libxml2-utils - - name: Install missing software on ubuntu (Python 2) - if: matrix.python-version == '2.7' - run: | - python -m pip install pip --upgrade - python -m pip install pathlib - python -m pip install pytest - python -m pip install pygments - - name: Install missing software on ubuntu (Python 3) - if: matrix.python-version != '2.7' run: | # shellcheck cannot be installed via pip # ERROR: Could not find a version that satisfies the requirement shellcheck (from versions: none) @@ -124,7 +114,6 @@ jobs: make -j$(nproc) validateCFG validatePlatforms validateRules - name: check python syntax - if: matrix.python-version != '2.7' run: | python -m py_compile addons/*.py python -m py_compile htmlreport/cppcheck-htmlreport @@ -167,14 +156,12 @@ jobs: PYTHONPATH: ./tools - name: test donate_cpu_lib - if: matrix.python-version != '2.7' run: | python -m pytest -Werror --strict-markers -vv tools/donate_cpu_lib_test.py env: PYTHONPATH: ./tools - name: test donate_cpu_server - if: matrix.python-version != '2.7' run: | python -m pytest -Werror --strict-markers -vv tools/donate_cpu_server_test.py env: diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake index 05122062b42..67b4a2a3712 100644 --- a/cmake/findDependencies.cmake +++ b/cmake/findDependencies.cmake @@ -54,6 +54,8 @@ else() if(NOT PYTHONINTERP_FOUND AND NOT USE_MATCHCOMPILER_OPT STREQUAL "Off") message(WARNING "No python interpreter found - disabling matchcompiler.") set(USE_MATCHCOMPILER_OPT "Off") + else() + message(WARNING "Support for Python 2.7 is deprecated (it went EOL in January 2020) and will be removed in Cppcheck 2.16 - please use Python 3.x instead.") endif() endif() if(PYTHONINTERP_FOUND) diff --git a/releasenotes.txt b/releasenotes.txt index a04d884e540..3a3aa928936 100644 --- a/releasenotes.txt +++ b/releasenotes.txt @@ -13,6 +13,7 @@ Changed interface: - Deprecations: +- Support for Python 2.7 has been deprecated (it went EOL in January 2020) and will be removed in Cppcheck 2.16 - please use Python 3.x instead. - Other: