Skip to content

Commit bdbeaba

Browse files
committed
build-kivy: constrain pytest below 9.1 for the test run
Test collection failed on all matrix legs with "Failed: Marks cannot be applied to fixtures." in common.py's async_run helper (pytest.mark.asyncio(pytest_asyncio.fixture(func))). Not riscv64-specific: setup.cfg's [dev] extra pins pytest>=3.6 and pytest-asyncio!=0.11.0, both open-ended, so install_kivy_wheel dev resolves against today's PyPI and lands on pytest 9.1+. Verified by diffing the pytest 9.0.3 and 9.1.0 wheels directly: the same message lives in _pytest/deprecated.py (a PytestRemovedIn8Warning) through 9.0.3, and moves to _pytest/fixtures.py as a hard fail() in 9.1.0. A PIP_CONSTRAINT file caps pytest for the test install only, without touching setup.cfg's own bound or the shipped wheel's dependencies (kivy declares no pytest runtime dependency at all). Signed-off-by: Ludovic Henry <git@ludovic.dev>
1 parent 159a1e6 commit bdbeaba

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎.github/workflows/build-kivy.yml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,19 @@ jobs:
221221
source .ci/ubuntu_ci.sh
222222
prepare_env_for_unittest
223223
224+
# setup.cfg's [dev] extra pins pytest>=3.6 and pytest-asyncio!=0.11.0, both with no
225+
# upper bound. install_kivy_wheel below resolves that against today's PyPI, landing on
226+
# pytest 9.1+, where a check that used to be a PytestRemovedIn8Warning (deprecated.py)
227+
# became a hard `Failed: Marks cannot be applied to fixtures.` (fixtures.py) -- verified
228+
# by diffing the pytest 9.0.3 and 9.1.0 wheels directly. common.py's own async_run
229+
# decorator does pytest.mark.asyncio(pytest_asyncio.fixture(func)), exactly the pattern
230+
# that now trips. A PIP_CONSTRAINT keeps pytest below that line without touching
231+
# setup.cfg's own bound.
232+
- name: Constrain pytest for the test run
233+
run: |
234+
echo 'pytest<9.1' > "${{ runner.temp }}/constraints.txt"
235+
echo "PIP_CONSTRAINT=${{ runner.temp }}/constraints.txt" >> "$GITHUB_ENV"
236+
224237
- name: Install Kivy
225238
run: |
226239
source .ci/ubuntu_ci.sh

0 commit comments

Comments
 (0)