From 5aaac2e9f90ada11e79535fd7c5a2dc18e8eeb59 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Wed, 11 Oct 2023 10:53:45 +0200 Subject: [PATCH] default to testing with Python 3.12 --- .github/workflows/ci-tests.yml | 14 +++++++------- cwltool.Dockerfile | 8 ++++---- release-test.sh | 4 ++-- tox.ini | 33 ++++++++++++++++----------------- 4 files changed, 29 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index ef178eacd..82b8510ec 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -95,8 +95,8 @@ jobs: step: [lintreadme, shellcheck, pydocstyle] env: - py-semver: "3.11" - TOXENV: ${{ format('py311-{0}', matrix.step) }} + py-semver: "3.12" + TOXENV: ${{ format('py312-{0}', matrix.step) }} steps: - uses: actions/checkout@v4 @@ -125,7 +125,7 @@ jobs: name: No leftovers runs-on: ubuntu-22.04 env: - py-semver: "3.11" + py-semver: "3.12" steps: - uses: actions/checkout@v4 with: @@ -196,7 +196,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: 3.12 cache: pip - name: "Test CWL ${{ matrix.cwl-version }} conformance" @@ -226,7 +226,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: 3.12 cache: pip cache-dependency-path: | requirements.txt @@ -256,7 +256,7 @@ jobs: name: Test on macos-latest runs-on: macos-latest env: - TOXENV: py311-unit + TOXENV: py312-unit steps: - uses: actions/checkout@v4 with: @@ -264,7 +264,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: 3.12 cache: pip cache-dependency-path: | requirements.txt diff --git a/cwltool.Dockerfile b/cwltool.Dockerfile index d011ff8c4..306c2997c 100644 --- a/cwltool.Dockerfile +++ b/cwltool.Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-alpine3.17 as builder +FROM python:3.12-alpine3.17 as builder RUN apk add --no-cache git gcc python3-dev libxml2-dev libxslt-dev libc-dev linux-headers @@ -8,20 +8,20 @@ RUN CWLTOOL_USE_MYPYC=1 MYPYPATH=mypy-stubs pip wheel --no-binary schema-salad \ --wheel-dir=/wheels .[deps] # --verbose RUN rm /wheels/schema_salad* RUN pip install "black~=22.0" -# galaxy-util 22.1.2 depends on packaging<22, but black 23.x needs packaging>22 +# galaxy-util 22.1.x depends on packaging<22, but black 23.x needs packaging>22 RUN SCHEMA_SALAD_USE_MYPYC=1 MYPYPATH=mypy-stubs pip wheel --no-binary schema-salad \ $(grep schema.salad requirements.txt) "black~=22.0" --wheel-dir=/wheels # --verbose RUN pip install --force-reinstall --no-index --no-warn-script-location \ --root=/pythonroot/ /wheels/*.whl # --force-reinstall to install our new mypyc compiled schema-salad package -FROM python:3.11-alpine3.17 as module +FROM python:3.12-alpine3.17 as module LABEL maintainer peter.amstutz@curii.com RUN apk add --no-cache docker nodejs 'graphviz<8' libxml2 libxslt COPY --from=builder /pythonroot/ / -FROM python:3.11-alpine3.17 +FROM python:3.12-alpine3.17 LABEL maintainer peter.amstutz@curii.com RUN apk add --no-cache docker nodejs 'graphviz<8' libxml2 libxslt diff --git a/release-test.sh b/release-test.sh index d9276c372..4faf6a184 100755 --- a/release-test.sh +++ b/release-test.sh @@ -25,8 +25,8 @@ run_tests() { "${test_prefix}"bin/py.test "--ignore=${mod_loc}/schemas/" \ --pyargs -x ${module} -n auto --dist=loadfile } -pipver=20.3.4 # minimum required version of pip for Python 3.10 -setuptoolsver=52.0.0 +pipver=23.1 # minimum required version of pip for Python 3.12 +setuptoolsver=67.6.1 # required for Python 3.12 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" rm -Rf testenv? || /bin/true diff --git a/tox.ini b/tox.ini index 86bc7c0aa..bef6b9343 100644 --- a/tox.ini +++ b/tox.ini @@ -4,9 +4,9 @@ envlist = py3{8,9,10,11,12}-unit py3{8,9,10,11,12}-bandit py3{8,9,10,11,12}-mypy - py311-lintreadme - py311-shellcheck - py311-pydocstyle + py312-lintreadme + py312-shellcheck + py312-pydocstyle skip_missing_interpreters = True @@ -31,9 +31,9 @@ description = py3{8,9,10,11,12}-lint: Lint the Python code py3{8,9,10,11,12}-bandit: Search for common security issues py3{8,9,10,11,12}-mypy: Check for type safety - py311-pydocstyle: docstring style checker - py311-shellcheck: syntax check for shell scripts - py311-lintreadme: Lint the README.rst→.md conversion + py312-pydocstyle: docstring style checker + py312-shellcheck: syntax check for shell scripts + py312-lintreadme: Lint the README.rst→.md conversion passenv = CI @@ -50,28 +50,27 @@ deps = py3{8,9,10,11,12}-bandit: bandit py3{8,9,10,11,12}-bandit: importlib_metadata != 4.8.0 py3{8,9,10,11,12}-mypy: -rmypy-requirements.txt - py311-pydocstyle: pydocstyle - py311-pydocstyle: diff-cover - py311-lintreadme: twine - py311-lintreadme: build - py311-lintreadme: readme_renderer[rst] + py312-pydocstyle: pydocstyle + py312-pydocstyle: diff-cover + py312-lintreadme: twine + py312-lintreadme: build + py312-lintreadme: readme_renderer[rst] setenv = py3{8,9,10,11,12}-unit: LC_ALL = C.UTF-8 commands_pre = py3{8,9,10,11,12}-unit: python -m pip install -U pip setuptools wheel - py311-lintreadme: python -m build --outdir {distdir} + py312-lintreadme: python -m build --outdir {distdir} commands = py3{8,9,10,11,12}-unit: make coverage-report coverage.xml PYTEST_EXTRA={posargs} py3{8,9,10,11,12}-bandit: bandit -r cwltool py3{8,9,10,11,12}-lint: make flake8 format-check codespell-check - py3{8,9,10,11,12}-mypy: make mypy PYTEST_EXTRA={posargs} - py3{8,9,10,11}-mypy: make mypyc PYTEST_EXTRA={posargs} - py311-shellcheck: make shellcheck - py311-pydocstyle: make diff_pydocstyle_report - py311-lintreadme: twine check {distdir}/* + py3{8,9,10,11,12}-mypy: make mypy mypyc PYTEST_EXTRA={posargs} + py312-shellcheck: make shellcheck + py312-pydocstyle: make diff_pydocstyle_report + py312-lintreadme: twine check {distdir}/* skip_install = py3{8,9,10,11,12}-{bandit,lint,mypy,shellcheck,pydocstyle,lintreadme}: true