diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3f945b84b7f0..3e78bf51913e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -41,7 +41,7 @@ jobs: with: python-version: '3.12' - name: Install tox - run: pip install tox==4.21.2 + run: pip install tox==4.26.0 - name: Setup tox environment run: tox run -e ${{ env.TOXENV }} --notest - name: Test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c42550431bb1..97fb7755563b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,12 +47,11 @@ jobs: os: ubuntu-24.04-arm toxenv: py tox_extra_args: "-n 4" - - name: Test suite with py311-ubuntu, mypyc-compiled + - name: Test suite with py311-ubuntu python: '3.11' os: ubuntu-24.04-arm toxenv: py tox_extra_args: "-n 4" - test_mypyc: true - name: Test suite with py312-ubuntu, mypyc-compiled python: '3.12' os: ubuntu-24.04-arm @@ -66,13 +65,13 @@ jobs: tox_extra_args: "-n 4" test_mypyc: true - # - name: Test suite with py314-dev-ubuntu - # python: '3.14-dev' - # os: ubuntu-24.04-arm - # toxenv: py - # tox_extra_args: "-n 4" - # allow_failure: true - # test_mypyc: true + - name: Test suite with py314-dev-ubuntu + python: '3.14-dev' + os: ubuntu-24.04-arm + toxenv: py + tox_extra_args: "-n 4" + # allow_failure: true + test_mypyc: true - name: mypyc runtime tests with py39-macos python: '3.9.21' @@ -115,6 +114,8 @@ jobs: FORCE_COLOR: ${{ !(startsWith(matrix.os, 'windows-') && startsWith(matrix.toxenv, 'py')) && 1 || 0 }} # Tox PY_COLORS: 1 + # Python -- Disable argparse help colors (3.14+) + PYTHON_COLORS: 0 # Mypy (see https://github.com/python/mypy/issues/7771) TERM: xterm-color MYPY_FORCE_COLOR: 1 @@ -167,7 +168,7 @@ jobs: echo debug build; python -c 'import sysconfig; print(bool(sysconfig.get_config_var("Py_DEBUG")))' echo os.cpu_count; python -c 'import os; print(os.cpu_count())' echo os.sched_getaffinity; python -c 'import os; print(len(getattr(os, "sched_getaffinity", lambda *args: [])(0)))' - pip install setuptools==75.1.0 tox==4.21.2 + pip install setuptools==75.1.0 tox==4.26.0 - name: Compiled with mypyc if: ${{ matrix.test_mypyc }} @@ -230,7 +231,7 @@ jobs: default: 3.11.1 command: python -c "import platform; print(f'{platform.architecture()=} {platform.machine()=}');" - name: Install tox - run: pip install setuptools==75.1.0 tox==4.21.2 + run: pip install setuptools==75.1.0 tox==4.26.0 - name: Setup tox environment run: tox run -e py --notest - name: Test diff --git a/mypyc/test-data/run-misc.test b/mypyc/test-data/run-misc.test index f12d6618681a..f6a1c744cade 100644 --- a/mypyc/test-data/run-misc.test +++ b/mypyc/test-data/run-misc.test @@ -969,7 +969,10 @@ print(z) [case testCheckVersion] import sys -if sys.version_info[:2] == (3, 13): +if sys.version_info[:2] == (3, 14): + def version() -> int: + return 14 +elif sys.version_info[:2] == (3, 13): def version() -> int: return 13 elif sys.version_info[:2] == (3, 12): diff --git a/tox.ini b/tox.ini index a505950521fa..65f67aba42a2 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,7 @@ envlist = py311, py312, py313, + py314, docs, lint, type, @@ -16,10 +17,11 @@ isolated_build = true [testenv] description = run the test driver with {basepython} passenv = - PYTEST_XDIST_WORKER_COUNT PROGRAMDATA PROGRAMFILES(X86) PYTEST_ADDOPTS + PYTEST_XDIST_WORKER_COUNT + PYTHON_COLORS deps = -r test-requirements.txt # This is a bit of a hack, but ensures the faster-cache path is tested in CI