chore(ci): remove obsolete `test_python_support`
What changed, and why it matters
This commit simply removes an outdated automated test that checked whether some Python helper scripts were compatible with old Python versions (3.7–3.9). It does not change any wallet, firmware, or security-sensitive code. There is no indication this is a security fix or that it introduces a vulnerability.
No security action required. Treat as routine maintenance. If the project still supports Python 3.7–3.9 for these tools, consider replacing the removed check with an equivalent modern linting step rather than leaving compatibility unverified.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change deletes tests/test_python_support.py and the CI/Makefile plumbing that invoked it. The deleted test ran pyright with –pythonversion 3.7/3.8/3.9 against tools/, common/, core/tools/, and core/site_scons looking for typing compatibility issues. No runtime code in the device firmware, bootloader, or crypto libraries is modified.
Changed components
CI workflow (.github/workflows/common.yml)Makefile target python_support_checktests/test_python_support.py (deleted)Inspect captured patch +0 / −74
diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml
index 2df13d25c..d5ac39229 100644
--- a/.github/workflows/common.yml
+++ b/.github/workflows/common.yml
@@ -79,16 +79,6 @@ jobs:
# LD_LIBRARY_PATH workaround: https://discourse.nixos.org/t/nixpkgs-nixos-unstable-many-package-fail-with-glibc-2-38-not-found/35078 https://github.com/NixOS/nixpkgs/issues/287764
- run: nix-shell --arg fullDeps true --run "unset LD_LIBRARY_PATH && cd python && uv run tox"
- python_support_test:
- name: Python support test
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- with:
- submodules: recursive
- - uses: ./.github/actions/environment
- - run: nix-shell --run "uv run make python_support_check"
-
storage_test:
name: Storage test
# TODO: only for changes in storage/
diff --git a/Makefile b/Makefile
index bea3e5ec0..54a462980 100644
--- a/Makefile
+++ b/Makefile
@@ -98,9 +98,6 @@ ruststyle_check:
@cd core/embed/rust ; cargo fmt -- --check
@cd rust/trezor-client ; cargo fmt -- --check
-python_support_check:
- ./tests/test_python_support.py
-
## code generation commands:
mocks: ## generate mock python headers from C modules
diff --git a/tests/test_python_support.py b/tests/test_python_support.py
deleted file mode 100755
index bb705f230..000000000
--- a/tests/test_python_support.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python3
-"""
-Verifying that all the tools can be run even by older python versions.
-
-Uses `pyright --pythonversion 3.X <path>` output to check for substrings that
-indicate the type-hints in the code are not compatible with this version.
-"""
-
-import os
-import subprocess
-import sys
-from pathlib import Path
-
-HERE = Path(__file__).resolve().parent
-ROOT_DIR = HERE.parent
-
-EXIT_CODE = 0
-
-os.chdir(ROOT_DIR)
-
-versions_to_check = [
- "3.7",
- "3.8",
- "3.9",
-]
-
-dirs_to_check = [
- "tools",
- "common",
- "core/tools",
- "core/site_scons",
-]
-
-signs_of_issues = [
- "is unknown import symbol", # we need to import some stuff from typing_extensions instead of typing
- "will generate runtime exception", # happens when using `dict` or `list` as a type alias
-]
-
-
-def check_directory(path: str, python_version: str) -> None:
- global EXIT_CODE
- cmd = (
- "pyright",
- "--pythonversion",
- python_version,
- path,
- )
-
- result = subprocess.run(cmd, stdout=subprocess.PIPE, text=True)
- for line in result.stdout.splitlines():
- if any(sign in line for sign in signs_of_issues):
- print(line)
- EXIT_CODE = 1
-
-
-for version in versions_to_check:
- print(f"Checking python version {version}")
- for dir_to_check in dirs_to_check:
- check_directory(dir_to_check, version)
-
-sys.exit(EXIT_CODE)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.