From 2fd6730d4f9c056a98cadfb8c6503e718bd01a75 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 2 Oct 2024 17:08:07 +0200 Subject: [PATCH] [mod] py3.8 EOL / upgrade to actions/setup-python@v5 Signed-off-by: Markus Heiser --- .github/workflows/integration.yml | 28 +++++++++++------------ .github/workflows/translations-update.yml | 6 ++--- docs/build-templates/searxng.rst | 2 +- requirements-dev.txt | 6 ++--- utils/lib_sxng_test.sh | 7 +----- 5 files changed, 21 insertions(+), 28 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index c6e74eaef..c085ad8e9 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12",] steps: - name: Checkout uses: actions/checkout@v4 @@ -25,7 +25,7 @@ jobs: sudo ./utils/searxng.sh install packages sudo apt install firefox - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} architecture: 'x64' @@ -63,9 +63,9 @@ jobs: - name: Install Ubuntu packages run: sudo ./utils/searxng.sh install buildhost - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' architecture: 'x64' - name: Cache Python dependencies id: cache-python @@ -75,7 +75,7 @@ jobs: ./local ./.nvm ./node_modules - key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }} + key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }} - name: Install node dependencies run: make V=1 node.env - name: Build themes @@ -95,9 +95,9 @@ jobs: - name: Install Ubuntu packages run: sudo ./utils/searxng.sh install buildhost - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' architecture: 'x64' - name: Cache Python dependencies id: cache-python @@ -107,7 +107,7 @@ jobs: ./local ./.nvm ./node_modules - key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }} + key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }} - name: Build documentation run: | make V=1 docs.clean docs.html @@ -139,9 +139,9 @@ jobs: fetch-depth: '0' token: ${{ secrets.WEBLATE_GITHUB_TOKEN }} - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' architecture: 'x64' - name: Cache Python dependencies id: cache-python @@ -151,7 +151,7 @@ jobs: ./local ./.nvm ./node_modules - key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }} + key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }} - name: weblate & git setup env: WEBLATE_CONFIG: ${{ secrets.WEBLATE_CONFIG }} @@ -183,9 +183,9 @@ jobs: # make sure "make docker.push" can get the git history fetch-depth: '0' - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' architecture: 'x64' - name: Cache Python dependencies id: cache-python @@ -195,7 +195,7 @@ jobs: ./local ./.nvm ./node_modules - key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }} + key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }} - name: Set up QEMU if: env.DOCKERHUB_USERNAME != null uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/translations-update.yml b/.github/workflows/translations-update.yml index 6c1c24562..ea0116662 100644 --- a/.github/workflows/translations-update.yml +++ b/.github/workflows/translations-update.yml @@ -16,9 +16,9 @@ jobs: fetch-depth: '0' token: ${{ secrets.WEBLATE_GITHUB_TOKEN }} - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' architecture: 'x64' - name: Cache Python dependencies id: cache-python @@ -28,7 +28,7 @@ jobs: ./local ./.nvm ./node_modules - key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }} + key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }} - name: weblate & git setup env: WEBLATE_CONFIG: ${{ secrets.WEBLATE_CONFIG }} diff --git a/docs/build-templates/searxng.rst b/docs/build-templates/searxng.rst index bc5d3e8fc..cdd665c74 100644 --- a/docs/build-templates/searxng.rst +++ b/docs/build-templates/searxng.rst @@ -113,7 +113,7 @@ ${fedora_build} (${SERVICE_USER})$ command -v python && python --version $SEARXNG_PYENV/bin/python - Python 3.8.1 + Python 3.11.10 # update pip's boilerplate .. pip install -U pip diff --git a/requirements-dev.txt b/requirements-dev.txt index 148cdd56c..13a21018b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,8 +6,7 @@ pylint==3.2.7 splinter==0.21.0 selenium==4.25.0 Pallets-Sphinx-Themes==2.1.3 -Sphinx<=7.1.2; python_version == '3.8' -Sphinx==7.4.7; python_version > '3.8' +Sphinx==7.4.7 sphinx-issues==4.1.0 sphinx-jinja==2.0.2 sphinx-tabs==3.4.5 @@ -20,6 +19,5 @@ aiounittest==1.4.2 yamllint==1.35.1 wlc==1.15 coloredlogs==15.0.1 -docutils<=0.21; python_version == '3.8' -docutils>=0.21.2; python_version > '3.8' +docutils>=0.21.2 parameterized==0.9.0 diff --git a/utils/lib_sxng_test.sh b/utils/lib_sxng_test.sh index 5e4c94f36..9ac71aeeb 100755 --- a/utils/lib_sxng_test.sh +++ b/utils/lib_sxng_test.sh @@ -93,13 +93,8 @@ test.robot() { test.rst() { build_msg TEST "[reST markup] ${RST_FILES[*]}" - local rst2html=rst2html - if [ "3.8" == "$(python -c 'import sys; print(".".join([str(x) for x in sys.version_info[:2]]))')" ]; then - rst2html=rst2html.py - fi - for rst in "${RST_FILES[@]}"; do - pyenv.cmd "${rst2html}" --halt error "$rst" > /dev/null || die 42 "fix issue in $rst" + pyenv.cmd rst2html --halt error "$rst" > /dev/null || die 42 "fix issue in $rst" done }