ci(python): run the pipeline, its tests and every data job on Python 3.15

- Sixteen setup-python steps move from '3.12' to '3.15'. codeql.yml alone
  stays on '3.14': CodeQL's supported-languages page lists Python up to 3.14
  and its extractor runs on that interpreter; the pipeline uses no 3.15-only
  syntax.
- The updater-json job of release-desktop.yml sets up 3.15 instead of
  running the runner image's python3.
- Four text-mode writes name encoding="utf-8": the dead-link log, both
  leaderboards and clear_temp(). 3.15 makes UTF-8 the default (PEP 686); on
  Windows an older Python writes cp1252, which cannot encode the
  leaderboards' emoji, so those scripts crashed there. CI already wrote
  UTF-8, so no committed output changes.
- requirements.txt's compile line and sonar.python.version say 3.15.
  `uv pip compile --universal` gives the same lock for 3.12 and 3.15, and
  every pin installs on 3.15 with --require-hashes --only-binary :all:
  (charset-normalizer's cp315 wheels were already hashed).

Checked on Python 3.15.1: the 299 tests pass with EncodingWarning and
DeprecationWarning as errors; edit_game.py --check and delete_game.py
--check pass; a full save_main(load_main()) on a copy of the data leaves all
36 files byte-identical to HEAD, as on 3.14, so no shard and no index.json
changes when the data jobs move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
poli0981andClaude Opus 5.5 committed 2026-10-22 10:19:30 +07:00
1 parent e10d2e7b9d
commit 09991874d7
24 files changed
+37 -24

No files matched your search

+1 -1
View File
@@ -64,7 +64,7 @@ jobs:
- uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.15'
- name: Assert discovery cannot write the dataset
run: |
+1 -1
View File
@@ -14,6 +14,6 @@ jobs :
uses : actions/checkout@v6
-
uses : actions/setup-python@v6
with : { python-version : '3.12' }
with : { python-version : '3.15' }
-
run : chmod +x ./bash/dead_links.sh && ./bash/dead_links.sh
+1 -1
View File
@@ -63,7 +63,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.15'
- run: |
pip install --quiet --require-hashes --only-binary :all: -r requirements.txt
- name: Validate every override
+6 -1
View File
@@ -75,11 +75,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
# The one workflow not on the pipeline's Python (3.15, every other
# setup-python): CodeQL's supported-languages page lists Python up to
# 3.14, and its extractor runs on this interpreter. The pipeline uses no
# 3.15-only syntax, so nothing goes unparsed. web/shared/toolchain.test.ts
# names this exception; move it when CodeQL lists 3.15.
- name: Setup Python
if: matrix.language == 'python'
uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.14'
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
+1 -1
View File
@@ -49,7 +49,7 @@ jobs:
- uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.15'
# Belt-and-braces for the propose-only guarantee above. `contents: read`
# already blocks a push, but this fails the job at the point the intent is
+1 -1
View File
@@ -35,7 +35,7 @@ jobs :
with : { ref : main }
-
uses : actions/setup-python@v6
with : { python-version : '3.12' }
with : { python-version : '3.15' }
-
run : chmod +x ./bash/ingest.sh && ./bash/ingest.sh
env : { STEAM_API_KEY : '${{ secrets.STEAM_API_KEY }}' }
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.15'
cache: 'pip'
cache-dependency-path: requirements.txt
+1 -1
View File
@@ -14,7 +14,7 @@ jobs :
uses : actions/checkout@v6
-
uses : actions/setup-python@v6
with : { python-version : '3.12' }
with : { python-version : '3.15' }
-
run : chmod +x ./bash/purge.sh && ./bash/purge.sh
env : { STEAM_API_KEY : '${{ secrets.STEAM_API_KEY }}' }
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.15'
# The data pipeline's own install line, exactly as bash/*.sh run it, so a
# Dependabot bump of requirements.txt is proven here before a data job
# meets it. Hash mode is all-or-nothing per pip call, hence the second
+1 -1
View File
@@ -33,7 +33,7 @@ jobs :
name : Setup Python
uses : actions/setup-python@v6
with :
python-version : '3.12'
python-version : '3.15'
-
name : Force re-fetch all games
+1 -1
View File
@@ -38,7 +38,7 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with: {python-version: '3.12'}
with: {python-version: '3.15'}
- run: chmod +x ./bash/refresh_peaks.sh && ./bash/refresh_peaks.sh
env:
PEAKS_ALL: ${{ inputs.backfill }}
+1 -1
View File
@@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v6
with: {ref: main}
- uses: actions/setup-python@v6
with: {python-version: '3.12'}
with: {python-version: '3.15'}
- run: chmod +x ./bash/refresh_store.sh && ./bash/refresh_store.sh
env:
REFRESH_ONLY: ${{ inputs.only }}
+6
View File
@@ -128,6 +128,12 @@ jobs:
steps:
- uses: actions/checkout@v5
# updater_json.py is stdlib-only, but it runs on the pipeline's Python
# like every other script, not on whatever the runner image ships.
- uses: actions/setup-python@v6
with:
python-version: '3.15'
- name: Point latest.json at the release downloads
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+1 -1
View File
@@ -14,5 +14,5 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: {python-version: '3.12'}
with: {python-version: '3.15'}
- run: chmod +x ./bash/snapshot.sh && ./bash/snapshot.sh
+1 -1
View File
@@ -14,6 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: {python-version: '3.12'}
with: {python-version: '3.15'}
- run: chmod +x ./bash/offline.sh && ./bash/offline.sh
env: {STEAM_API_KEY: '${{ secrets.STEAM_API_KEY }}'}
+1 -1
View File
@@ -12,6 +12,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: {python-version: '3.12'}
with: {python-version: '3.15'}
- run: chmod +x ./bash/online.sh && ./bash/online.sh
env: {STEAM_API_KEY: '${{ secrets.STEAM_API_KEY }}'}
+1 -1
View File
@@ -12,6 +12,6 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with: {python-version: '3.12'}
with: {python-version: '3.15'}
- run: chmod +x ./bash/json.sh && ./bash/json.sh
env: {STEAM_API_KEY: '${{ secrets.STEAM_API_KEY }}'}
+1 -1
View File
@@ -14,6 +14,6 @@ jobs :
uses : actions/checkout@v6
-
uses : actions/setup-python@v6
with : { python-version : '3.12' }
with : { python-version : '3.15' }
-
run : chmod +x ./bash/reviews.sh && ./bash/reviews.sh
+4 -2
View File
@@ -33,5 +33,7 @@ sonar.test.inclusions=scripts/tests/**,**/*.test.ts,web/src/lib/testing/**,web/w
sonar.exclusions=scripts/tests/**,**/*.test.ts,web/src/lib/testing/**,web/worker/testing/**,web/admin/mock/**,data/**,games/**,**/*.jsonl,**/*.sql,web/src/app.html,web/src-tauri/gen/android/app/src/main/res/**,web/src-tauri/gen/android/buildSrc/**,web/src-tauri/icons/**
sonar.sourceEncoding=UTF-8
# The version every workflow sets up (actions/setup-python).
sonar.python.version=3.12
# The version every workflow sets up (actions/setup-python), except CodeQL's,
# which stays on the newest Python CodeQL supports. web/shared/toolchain.test.ts
# holds them equal.
sonar.python.version=3.15
+1 -1
View File
@@ -6,7 +6,7 @@
#
# The top level is requests and urllib3; the rest is what they need. Adding a
# package means adding it AND its dependencies, each with its hashes:
# uv pip compile --universal --generate-hashes --python-version 3.12 <list>
# uv pip compile --universal --generate-hashes --python-version 3.15 <list>
# prints exactly that. Dependabot (pip, weekly) bumps the pins and their hashes.
certifi==2026.10.18 \
--hash=sha256:73191c47aaa79da394e8fee2dbc2ec827432cab56311122c9e47abf79e390f62 \
+1 -1
View File
@@ -34,7 +34,7 @@ def main():
save_main(games)
if dead:
ts = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M UTC")
with open(DEAD_LINKS_LOG, "a") as f:
with open(DEAD_LINKS_LOG, "a", encoding="utf-8") as f:
f.write(f"\n── {ts} ──\n")
for d in dead: f.write(f" [{d['code']}] {d['name']} ({d['appid']})\n")
print(f"\n💀 {len(dead)} dead")
+1 -1
View File
@@ -405,7 +405,7 @@ def load_temp() -> list[dict]:
def clear_temp():
if os.path.isfile(TEMP_JSONL):
with open(TEMP_JSONL, "w") as f:
with open(TEMP_JSONL, "w", encoding="utf-8") as f:
f.write("")
print(f" ✓ Cleared {TEMP_JSONL}")
+1 -1
View File
@@ -75,7 +75,7 @@ def main():
tp = sum(_ppc(g.get("current_players", "0")) for g in offline)
now = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M UTC")
os.makedirs(GAMES_DIR, exist_ok=True)
with open(f"{GAMES_DIR}/top-offline.md", "w") as f:
with open(f"{GAMES_DIR}/top-offline.md", "w", encoding="utf-8") as f:
f.write(f"# 🎮 Top Offline – Single-Player Leaderboard\n\n")
f.write(f"> {now} | {len(offline)} offline games | {tp:,} concurrent players\n\n")
f.write("Free-to-play Steam games where `type_game` is set to anything other "
+1 -1
View File
@@ -56,7 +56,7 @@ def main():
tp = sum(_ppc(g.get("current_players","0")) for g in online)
now = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M UTC")
os.makedirs(GAMES_DIR, exist_ok=True)
with open(f"{GAMES_DIR}/top-online.md", "w") as f:
with open(f"{GAMES_DIR}/top-online.md", "w", encoding="utf-8") as f:
f.write(f"# 🎮 Top Online – Live Leaderboard\n\n> {now} | {len(online)} games | {tp:,} players\n\n")
f.write("| # | Game | Players | Trend | Tier | Rating | Genre | AC | Peak | Link |\n")
f.write("|---|------|---------|-------|------|--------|-------|----|------|------|\n")