Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed #12682 - deprecated support for Python 2.7 #6369

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions .github/workflows/scriptcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions cmake/findDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions releasenotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading