From 030e7ada23c4b394a4fa3214ff7a1fc97b4278a7 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 16:20:14 +0100 Subject: [PATCH] [CI] Use Python 3.13 where possible (#13637) --- .github/workflows/daily.yml | 3 ++- .github/workflows/meta_tests.yml | 6 ++++-- .github/workflows/stubsabot.yml | 2 +- .github/workflows/tests.yml | 15 ++++++++------- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 90823ea70..7949f351f 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -114,7 +114,8 @@ jobs: path: stub_uploader - uses: actions/setup-python@v5 with: - python-version: "3.12" + # Keep in sync with stub_uploader's check_scripts.yml workflow. + python-version: "3.13" - uses: astral-sh/setup-uv@v5 - name: Run tests run: | diff --git a/.github/workflows/meta_tests.yml b/.github/workflows/meta_tests.yml index d3749c72b..dd368ed0c 100644 --- a/.github/workflows/meta_tests.yml +++ b/.github/workflows/meta_tests.yml @@ -38,7 +38,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - run: curl -LsSf https://astral.sh/uv/install.sh | sh - run: uv pip install -r requirements-tests.txt --system - run: python ./tests/typecheck_typeshed.py --platform=${{ matrix.platform }} @@ -53,6 +53,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: + # TODO: Since pytype is not available for Python 3.13, and + # pytype_test.py imports pytype, we need to use Python 3.12 for now. python-version: "3.12" - run: curl -LsSf https://astral.sh/uv/install.sh | sh - run: uv pip install -r requirements-tests.txt --system @@ -70,7 +72,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Git config run: | diff --git a/.github/workflows/stubsabot.yml b/.github/workflows/stubsabot.yml index ef9a4e40c..3648d5168 100644 --- a/.github/workflows/stubsabot.yml +++ b/.github/workflows/stubsabot.yml @@ -26,7 +26,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: git config run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eabca8c7f..5031b000d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - run: curl -LsSf https://astral.sh/uv/install.sh | sh - run: uv pip install -r requirements-tests.txt --system - run: python ./tests/check_typeshed_structure.py @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - # Max supported Python version as of pytype 2024.9.13 + # Max supported Python version as of pytype 2024.10.11 python-version: "3.12" - uses: astral-sh/setup-uv@v5 - run: uv pip install -r requirements-tests.txt --system @@ -98,7 +98,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - uses: astral-sh/setup-uv@v5 - name: Install typeshed test-suite requirements # Install these so we can run `get_external_stub_requirements.py` @@ -122,14 +122,14 @@ jobs: version: PATH python-platform: ${{ matrix.python-platform }} python-version: ${{ matrix.python-version }} - annotate: ${{ matrix.python-version == '3.12' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy. + annotate: ${{ matrix.python-version == '3.13' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy. - name: Run pyright with stricter settings on some of the stubs uses: jakebailey/pyright-action@v2 with: version: PATH python-platform: ${{ matrix.python-platform }} python-version: ${{ matrix.python-version }} - annotate: ${{ matrix.python-version == '3.12' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy. + annotate: ${{ matrix.python-version == '3.13' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy. project: ./pyrightconfig.stricter.json - name: Run pyright on the test cases uses: jakebailey/pyright-action@v2 @@ -137,7 +137,7 @@ jobs: version: PATH python-platform: ${{ matrix.python-platform }} python-version: ${{ matrix.python-version }} - annotate: ${{ matrix.python-version == '3.12' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy. + annotate: ${{ matrix.python-version == '3.13' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy. project: ./pyrightconfig.testcases.json stub-uploader: @@ -155,7 +155,8 @@ jobs: path: stub_uploader - uses: actions/setup-python@v5 with: - python-version: "3.12" + # Keep in sync with stub_uploader's check_scripts.yml workflow. + python-version: "3.13" - uses: astral-sh/setup-uv@v5 - name: Run tests run: |