Skip to content

ci: the local gate's lint lane fails without a system PyYAML (test_ccache_launcher_installed.py) #1196

Closed

Description

@vpacher

Problem

On master, the lint lane of the local gate fails on a host without a system PyYAML:

$ ./lint
...
==== test_ccache_launcher_installed.py
ModuleNotFoundError: No module named 'yaml'
FAILED (errors=1)
== lane lint: FAILED (1)

Seen on Debian 13 (system Python 3.13 without python3-yaml) on ee120df9f. With uv run --with pyyaml ci/local_gate.py --lane lint the lane passes.

Cause

ci/test_ccache_launcher_installed.py (from #1183 / #1184) declares PyYAML as an inline script dependency:

# /// script
# dependencies = ["pyyaml"]
# ///

That metadata only applies when the file runs as a script (uv run --script ci/test_ccache_launcher_installed.py). The gate runs every ci/test_*.py as a module, sys.executable -m unittest discover -s ci -p <file> (ci/local_gate.py), and CI's "ci/ Self-Tests" step runs uv run python -m unittest discover -s ci -p "test_*.py". Neither installs the inline dependency. CI passes only because its runner's Python already has PyYAML. It is the only ci/test_*.py with an inline dependency; the other tests use the standard library only.

Fix options

  1. Read the workflow without PyYAML in this test (the check needs only the step order and the run: text of build-project.yaml), so that ci/test_*.py stays standard-library only.
  2. Declare PyYAML for the ci/ tests where both runners see it (for example run the gate's unittest and CI's self-tests with uv run --with pyyaml), and add a check that no ci/test_*.py has inline dependencies that the runners ignore.

Option 1 keeps the current rule ("plain-Python ci/ tests", check-format.yaml) intact.

Test plan

RED: a ci/ test that fails when a ci/test_*.py imports a module outside the standard library (or declares inline dependencies). GREEN: the chosen fix.

Activity

  1. vpacher commented on Oct 17, 2026

    @vpacher
    MemberAuthor

    Claiming: branch fix/ci-tests-stdlib-only. Plan: option 1 (read the workflow without PyYAML), with a RED check that every ci/test_*.py imports only the standard library and ci/ modules.

  2. added
    claimed
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions