Skip to content

Commit 00dd9a5

Browse files
authored
Unify python version used by CI. Update to 3.14.4 (RustPython#7571)
* Add `.python-version` file * Modify CI to use `.python-version` file * Use correct path for `.python-version` file
1 parent d5a90e5 commit 00dd9a5

File tree

7 files changed

+35
-32
lines changed

7 files changed

+35
-32
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ env:
2626
# - rustpython-compiler-source: deprecated
2727
# - rustpython-venvlauncher: Windows-only
2828
WORKSPACE_EXCLUDES: --exclude rustpython_wasm --exclude rustpython-compiler-source --exclude rustpython-venvlauncher
29-
# Python version targeted by the CI.
30-
PYTHON_VERSION: "3.14.3"
3129
X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR: C:\Program Files\OpenSSL\lib\VC\x64\MD
3230
X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR: C:\Program Files\OpenSSL\include
3331
CARGO_INCREMENTAL: 0
@@ -259,8 +257,6 @@ jobs:
259257
save-if: ${{ github.ref == 'refs/heads/main' }}
260258

261259
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
262-
with:
263-
python-version: ${{ env.PYTHON_VERSION }}
264260

265261
- name: Install macOS dependencies
266262
uses: ./.github/actions/install-macos-deps
@@ -362,8 +358,6 @@ jobs:
362358
persist-credentials: false
363359

364360
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
365-
with:
366-
python-version: ${{ env.PYTHON_VERSION }}
367361

368362
- uses: dtolnay/rust-toolchain@stable
369363
with:
@@ -469,8 +463,6 @@ jobs:
469463
tar -xzf geckodriver-v0.36.0-linux64.tar.gz -C geckodriver
470464
471465
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
472-
with:
473-
python-version: ${{ env.PYTHON_VERSION }}
474466

475467
- run: python -m pip install -r requirements.txt
476468
working-directory: ./wasm/tests

.github/workflows/cron-ci.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ name: Periodic checks/tasks
1313

1414
env:
1515
CARGO_ARGS: --no-default-features --features stdlib,importlib,stdio,encodings,ssl-rustls,jit,host_env
16-
PYTHON_VERSION: "3.14.3"
1716

1817
jobs:
1918
# codecov collects code coverage data from the rust tests, python snippets and python test suite.
@@ -30,9 +29,9 @@ jobs:
3029

3130
- uses: dtolnay/rust-toolchain@stable
3231
- uses: taiki-e/install-action@cargo-llvm-cov
33-
- uses: actions/setup-python@v6.2.0
34-
with:
35-
python-version: ${{ env.PYTHON_VERSION }}
32+
33+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
34+
3635
- run: sudo apt-get update && sudo apt-get -y install lcov
3736
- name: Run cargo-llvm-cov with Rust tests.
3837
run: cargo llvm-cov --no-report --workspace --exclude rustpython_wasm --exclude rustpython-compiler-source --exclude rustpython-venvlauncher --verbose --no-default-features --features stdlib,importlib,stdio,encodings,ssl-rustls,jit,host_env
@@ -96,9 +95,9 @@ jobs:
9695
persist-credentials: true
9796

9897
- uses: dtolnay/rust-toolchain@stable
99-
- uses: actions/setup-python@v6.2.0
100-
with:
101-
python-version: ${{ env.PYTHON_VERSION }}
98+
99+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
100+
102101
- name: build rustpython
103102
run: cargo build --release --verbose
104103
- name: Collect what is left data
@@ -157,9 +156,9 @@ jobs:
157156
persist-credentials: true
158157

159158
- uses: dtolnay/rust-toolchain@stable
160-
- uses: actions/setup-python@v6.2.0
161-
with:
162-
python-version: ${{ env.PYTHON_VERSION }}
159+
160+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
161+
163162
- run: cargo install cargo-criterion
164163
- name: build benchmarks
165164
run: cargo build --release --benches

.github/workflows/lib-deps-check.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number }}
1111
cancel-in-progress: true
1212

13-
env:
14-
PYTHON_VERSION: "3.14.3"
15-
1613
jobs:
1714
check_deps:
1815
permissions:
@@ -37,9 +34,20 @@ jobs:
3734
# Checkout only Lib/ directory from PR head for accurate comparison
3835
git checkout ${{ github.event.pull_request.head.sha }} -- Lib/
3936
40-
- name: Checkout CPython
37+
- name: Get target CPython version
38+
id: cpython-version
4139
run: |
42-
git clone --depth 1 --branch "v${{ env.PYTHON_VERSION }}" https://github.com/python/cpython.git cpython
40+
version=$(cat .python-version)
41+
echo "version=${version}" >> "$GITHUB_OUTPUT"
42+
43+
- name: Checkout CPython
44+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
45+
with:
46+
repository: python/cpython
47+
path: cpython
48+
ref: "v${{ steps.cpython-version.outputs.version }}"
49+
fetch-depth: 1
50+
persist-credentials: false
4351

4452
- name: Get changed Lib files
4553
id: changed-files
@@ -75,8 +83,6 @@ jobs:
7583
- name: Setup Python
7684
if: steps.changed-files.outputs.modules != ''
7785
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
78-
with:
79-
python-version: "${{ env.PYTHON_VERSION }}"
8086

8187
- name: Run deps check
8288
if: steps.changed-files.outputs.modules != ''

.github/workflows/update-libs-status.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ permissions:
1313
issues: write
1414

1515
env:
16-
PYTHON_VERSION: "v3.14.3"
1716
ISSUE_ID: "6839"
1817

1918
jobs:
@@ -29,13 +28,20 @@ jobs:
2928
sparse-checkout: |-
3029
Lib
3130
scripts/update_lib
31+
.python-version
3232
33-
- name: Clone CPython ${{ env.PYTHON_VERSION }}
33+
- name: Get target CPython version
34+
id: cpython-version
35+
run: |
36+
version=$(cat rustpython/.python-version)
37+
echo "version=${version}" >> "$GITHUB_OUTPUT"
38+
39+
- name: Clone CPython
3440
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3541
with:
3642
repository: python/cpython
3743
path: cpython
38-
ref: ${{ env.PYTHON_VERSION }}
44+
ref: "v${{ steps.cpython-version.outputs.version }}"
3945
persist-credentials: false
4046
sparse-checkout: |
4147
Lib
@@ -56,14 +62,14 @@ jobs:
5662
5763
## Summary
5864
59-
Check \`scripts/update_lib\` for tools. As a note, the current latest Python version is \`${{ env.PYTHON_VERSION }}\`.
65+
Check \`scripts/update_lib\` for tools. As a note, the current latest Python version is \`${{ steps.cpython-version.outputs.version }}\`.
6066
6167
Previous versions' issues as reference
6268
- 3.13: #5529
6369
6470
<!--
6571
Quick guideline for Copilot:
66-
# Clone \`github.com/python/cpython\` \`${{ env.PYTHON_VERSION }}\` tag under RustPython working dir with depth 1 option; never 3.14.0 or 3.14.1 or 3.14.2
72+
# Clone \`github.com/python/cpython\` \`${{ steps.cpython-version.outputs.version }}\` tag under RustPython working dir with depth 1 option; never 3.14.0 or 3.14.1 or 3.14.2
6773
# Pick a library or test to update. Probably user give one.
6874
# Run \`python3 scripts/update_lib quick <name>\`
6975
# A commit is automatically created. push the commit.

.github/workflows/upgrade-pylib.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ cache:
5252
- cpython-lib-
5353

5454
env:
55-
PYTHON_VERSION: "v3.14.3"
55+
PYTHON_VERSION: "v3.14.4"
5656
ISSUE_ID: "6839"
5757
---
5858

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ __pycache__/
1010
wasm-pack.log
1111
.idea/
1212
.envrc
13-
.python-version
1413

1514
flame-graph.html
1615
flame.txt

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.14.4

0 commit comments

Comments
 (0)