Skip to content

Commit 014541e

Browse files
authored
fix: declare a PyYAML floor that installs on Python 3.14 (#129)
`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
1 parent b8603da commit 014541e

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

‎.github/workflows/_checks.yml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,30 @@ jobs:
3434
'https://github\.com/${{ github.repository }}/(?:blob|tree)/main/(.*) file://${{ github.workspace }}/$1'
3535
'**/*.md'
3636
37+
floors:
38+
# The declared dependency floors, installed. Every other job resolves highest, so the
39+
# bottom of the range is otherwise never exercised and can rot unnoticed -- a PyYAML
40+
# floor that could not build on 3.14 shipped for exactly that reason (issue 126).
41+
# Binary-only, because the pitch is minimal images: a floor reachable only by
42+
# compiling an sdist is not a floor a user of one can install.
43+
# 3.14t is out: no PyYAML release ships a cp314t wheel, so that job would measure
44+
# upstream's gap rather than this repo's floor.
45+
runs-on: ubuntu-latest
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
python-version: ["3.10", "3.14"]
50+
steps:
51+
- uses: actions/checkout@v6
52+
- uses: astral-sh/setup-uv@v8.2.0
53+
with:
54+
enable-cache: true
55+
cache-dependency-glob: "**/pyproject.toml"
56+
- run: uv python install ${{ matrix.python-version }}
57+
- run: uv venv --python ${{ matrix.python-version }}
58+
- run: uv pip install --resolution lowest-direct --only-binary PyYAML ".[yaml]"
59+
- run: uv run --no-project python -c "import compose2pod, yaml; print(yaml.__version__)"
60+
3761
pytest:
3862
runs-on: ubuntu-latest
3963
strategy:

‎pyproject.toml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ classifiers = [
2222
version = "0"
2323

2424
[project.optional-dependencies]
25-
yaml = ["PyYAML>=6"]
25+
# Split rather than raised: 6.0.3 is the first PyYAML with a cp314 wheel, and 6.0's sdist
26+
# does not build on 3.14, but an older interpreter has no reason to lose the lower floor.
27+
yaml = [
28+
"PyYAML>=6; python_version < '3.14'",
29+
"PyYAML>=6.0.3; python_version >= '3.14'",
30+
]
2631

2732
[project.scripts]
2833
compose2pod = "compose2pod.cli:main"

0 commit comments

Comments
 (0)