Skip to content

Commit 57e0ea5

Browse files
authored
fixed #12682 - deprecated support for Python 2.7 (#6369)
1 parent 9bbc395 commit 57e0ea5

3 files changed

Lines changed: 5 additions & 15 deletions

File tree

.github/workflows/scriptcheck.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717
jobs:
1818
build:
1919

20-
# 'ubuntu-22.04' removes Python 2.7, 3.6 and 3.6 so keep the previous LTS version
20+
# 'ubuntu-22.04' removes Python 3.5 and 3.6 so keep the previous LTS version
2121
runs-on: ubuntu-20.04
2222

2323
steps:
@@ -43,8 +43,7 @@ jobs:
4343
scriptcheck:
4444

4545
needs: build
46-
# 'ubuntu-22.04' removes Python 2.7, 3.5 and 3.6 so keep the previous LTS version
47-
# 'ubutunu-20.04' no longer works on 2.7 - TODO: re-added in a different way or remove support for it?
46+
# 'ubuntu-22.04' removes Python 3.5 and 3.6 so keep the previous LTS version
4847
runs-on: ubuntu-20.04
4948
strategy:
5049
matrix:
@@ -75,16 +74,7 @@ jobs:
7574
sudo apt-get update
7675
sudo apt-get install tidy libxml2-utils
7776
78-
- name: Install missing software on ubuntu (Python 2)
79-
if: matrix.python-version == '2.7'
80-
run: |
81-
python -m pip install pip --upgrade
82-
python -m pip install pathlib
83-
python -m pip install pytest
84-
python -m pip install pygments
85-
8677
- name: Install missing software on ubuntu (Python 3)
87-
if: matrix.python-version != '2.7'
8878
run: |
8979
# shellcheck cannot be installed via pip
9080
# ERROR: Could not find a version that satisfies the requirement shellcheck (from versions: none)
@@ -124,7 +114,6 @@ jobs:
124114
make -j$(nproc) validateCFG validatePlatforms validateRules
125115
126116
- name: check python syntax
127-
if: matrix.python-version != '2.7'
128117
run: |
129118
python -m py_compile addons/*.py
130119
python -m py_compile htmlreport/cppcheck-htmlreport
@@ -167,14 +156,12 @@ jobs:
167156
PYTHONPATH: ./tools
168157

169158
- name: test donate_cpu_lib
170-
if: matrix.python-version != '2.7'
171159
run: |
172160
python -m pytest -Werror --strict-markers -vv tools/donate_cpu_lib_test.py
173161
env:
174162
PYTHONPATH: ./tools
175163

176164
- name: test donate_cpu_server
177-
if: matrix.python-version != '2.7'
178165
run: |
179166
python -m pytest -Werror --strict-markers -vv tools/donate_cpu_server_test.py
180167
env:

cmake/findDependencies.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ else()
5454
if(NOT PYTHONINTERP_FOUND AND NOT USE_MATCHCOMPILER_OPT STREQUAL "Off")
5555
message(WARNING "No python interpreter found - disabling matchcompiler.")
5656
set(USE_MATCHCOMPILER_OPT "Off")
57+
else()
58+
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.")
5759
endif()
5860
endif()
5961
if(PYTHONINTERP_FOUND)

releasenotes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Changed interface:
1313
-
1414

1515
Deprecations:
16+
- 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.
1617
-
1718

1819
Other:

0 commit comments

Comments
 (0)