From 3efa4ee26fac9c9a3cd3d6bf077faa20ccf229c6 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 14 Nov 2022 13:11:28 +0100 Subject: Remove support for running with Python 2.7 (#33063) * Remove CI jobs related to Python 2.7 * Remove Python 2.7 specific code from Spack core * Remove externals for Python 2 only * Remove llnl.util.compat --- .github/workflows/bootstrap.yml | 2 +- .github/workflows/ci.yaml | 8 +------- .github/workflows/unit_tests.yaml | 11 ++--------- .github/workflows/valid-style.yml | 6 +++--- 4 files changed, 7 insertions(+), 20 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index df2b0f346e..70935c1d6f 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -214,7 +214,7 @@ jobs: - name: Bootstrap clingo run: | set -ex - for ver in '2.7' '3.6' '3.7' '3.8' '3.9' '3.10' ; do + for ver in '3.6' '3.7' '3.8' '3.9' '3.10' ; do not_found=1 ver_dir="$(find $RUNNER_TOOL_CACHE/Python -wholename "*/${ver}.*/*/bin" | grep . || true)" echo "Testing $ver_dir" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3b57bd9bb5..ef951f341b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,12 +20,6 @@ jobs: uses: ./.github/workflows/valid-style.yml with: with_coverage: ${{ needs.changes.outputs.core }} - audit-ancient-python: - uses: ./.github/workflows/audit.yaml - needs: [ changes ] - with: - with_coverage: ${{ needs.changes.outputs.core }} - python_version: 2.7 all-prechecks: needs: [ prechecks ] runs-on: ubuntu-latest @@ -85,7 +79,7 @@ jobs: needs: [ prechecks ] uses: ./.github/workflows/windows_python.yml all: - needs: [ windows, unit-tests, bootstrap, audit-ancient-python ] + needs: [ windows, unit-tests, bootstrap ] runs-on: ubuntu-latest steps: - name: Success diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 6a21d166f8..efb8949e23 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -14,14 +14,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['2.7', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] concretizer: ['clingo'] on_develop: - ${{ github.ref == 'refs/heads/develop' }} include: - - python-version: 2.7 - concretizer: original - on_develop: ${{ github.ref == 'refs/heads/develop' }} - python-version: '3.11' concretizer: original on_develop: ${{ github.ref == 'refs/heads/develop' }} @@ -66,10 +63,6 @@ jobs: if python -c 'import sys; sys.exit(not sys.version_info >= (3, 6))'; then pip install --upgrade flake8 "isort>=4.3.5" "mypy>=0.900" "click==8.0.4" "black<=21.12b0" fi - - name: Pin pathlib for Python 2.7 - if: ${{ matrix.python-version == 2.7 }} - run: | - pip install -U pathlib2==2.3.6 toml - name: Setup git configuration run: | # Need this for the git tests to succeed. @@ -89,7 +82,7 @@ jobs: SPACK_TEST_SOLVER: ${{ matrix.concretizer }} SPACK_TEST_PARALLEL: 2 COVERAGE: true - UNIT_TEST_COVERAGE: ${{ (matrix.python-version == '3.11') }} + UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.11' }} run: | share/spack/qa/run-unit-tests - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 diff --git a/.github/workflows/valid-style.yml b/.github/workflows/valid-style.yml index a82c786b44..2d70406471 100644 --- a/.github/workflows/valid-style.yml +++ b/.github/workflows/valid-style.yml @@ -28,9 +28,9 @@ jobs: pip install --upgrade pip pip install --upgrade vermin - name: vermin (Spack's Core) - run: vermin --backport argparse --violations --backport typing -t=2.7- -t=3.6- -vvv lib/spack/spack/ lib/spack/llnl/ bin/ + run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv lib/spack/spack/ lib/spack/llnl/ bin/ - name: vermin (Repositories) - run: vermin --backport argparse --violations --backport typing -t=2.7- -t=3.6- -vvv var/spack/repos + run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv var/spack/repos # Run style checks on the files that have been changed style: runs-on: ubuntu-latest @@ -44,7 +44,7 @@ jobs: cache: 'pip' - name: Install Python packages run: | - python3 -m pip install --upgrade pip six setuptools types-six click==8.0.2 'black==21.12b0' mypy isort clingo flake8 + python3 -m pip install --upgrade pip six setuptools types-six black mypy isort clingo flake8 - name: Setup git configuration run: | # Need this for the git tests to succeed. -- cgit v1.2.3-60-g2f50