From 20a6ce98862d709effece8b7c726b74b2c7ba9b9 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Sun, 20 Sep 2026 16:54:37 +0300 Subject: [PATCH] fix: declare a PyYAML floor that installs on Python 3.14 `PyYAML>=6` resolves to 6.0 at the bottom of the range, and 6.0 ships no cp314 wheel: on 3.14 the resolver falls through to the sdist, whose build fails. 6.0.3 is the first release with a cp314 wheel, so the floor is marked per interpreter rather than raised for everyone. A `floors` job installs the declared floors binary-only on the oldest and newest supported interpreters. Every other job resolves highest, which is why nothing reported this. Closes #126 --- .github/workflows/_checks.yml | 24 ++++++++++++++++++++++++ pyproject.toml | 7 ++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_checks.yml b/.github/workflows/_checks.yml index 0828919..84ab4cc 100644 --- a/.github/workflows/_checks.yml +++ b/.github/workflows/_checks.yml @@ -34,6 +34,30 @@ jobs: 'https://github\.com/${{ github.repository }}/(?:blob|tree)/main/(.*) file://${{ github.workspace }}/$1' '**/*.md' + floors: + # The declared dependency floors, installed. Every other job resolves highest, so the + # bottom of the range is otherwise never exercised and can rot unnoticed -- a PyYAML + # floor that could not build on 3.14 shipped for exactly that reason (issue 126). + # Binary-only, because the pitch is minimal images: a floor reachable only by + # compiling an sdist is not a floor a user of one can install. + # 3.14t is out: no PyYAML release ships a cp314t wheel, so that job would measure + # upstream's gap rather than this repo's floor. + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.14"] + steps: + - uses: actions/checkout@v6 + - uses: astral-sh/setup-uv@v8.2.0 + with: + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" + - run: uv python install ${{ matrix.python-version }} + - run: uv venv --python ${{ matrix.python-version }} + - run: uv pip install --resolution lowest-direct --only-binary PyYAML ".[yaml]" + - run: uv run --no-project python -c "import compose2pod, yaml; print(yaml.__version__)" + pytest: runs-on: ubuntu-latest strategy: diff --git a/pyproject.toml b/pyproject.toml index 2ca25d8..2b34746 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,12 @@ classifiers = [ version = "0" [project.optional-dependencies] -yaml = ["PyYAML>=6"] +# Split rather than raised: 6.0.3 is the first PyYAML with a cp314 wheel, and 6.0's sdist +# does not build on 3.14, but an older interpreter has no reason to lose the lower floor. +yaml = [ + "PyYAML>=6; python_version < '3.14'", + "PyYAML>=6.0.3; python_version >= '3.14'", +] [project.scripts] compose2pod = "compose2pod.cli:main"