Skip to content

Commit 17bd096

Browse files
committed
build-kivy: tighten the pytest cap to <8, not just <9.1
<9.1 fixed the hard `Failed: Marks cannot be applied to fixtures.` error (that's pytest 9.1.0+ only), but the resolved 9.0.x still promotes the same underlying PytestRemovedIn9Warning to a collection ERROR at import time -- same test_app.py collection failure, different error class. pytest's own deprecation-escalation policy in the 9.0 pre-9.1 window apparently already enforces this one as fatal, not just warn-worthy. Drop the cap below the whole 8.x/9.0 cycle to pytest<8, the last major line predating this deprecation existing at all (my earlier diff of 7.4.4's _pytest/fixtures.py and deprecated.py found neither the warning nor the hard-error string). No change to pytest-asyncio's own version -- pip's resolver picks whichever release is compatible with pytest<8. Signed-off-by: Ludovic Henry <git@ludovic.dev>
1 parent bdbeaba commit 17bd096

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,16 +222,17 @@ jobs:
222222
prepare_env_for_unittest
223223
224224
# 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.
225+
# upper bound. install_kivy_wheel below resolves that against today's PyPI. pytest<9.1
226+
# alone isn't enough: 9.0.x still promotes the underlying PytestRemovedIn9Warning
227+
# (common.py's async_run does pytest.mark.asyncio(pytest_asyncio.fixture(func))) to a
228+
# collection ERROR, just with a different message than 9.1's hard `Failed:` -- pytest's
229+
# own pre-removal deprecation escalation, not a bug in this pin. Dropping below the
230+
# whole 8.x/9.0 cycle to pytest<8 avoids both; 7.4.4's _pytest source has neither the
231+
# warning nor the hard-error string at all. pytest-asyncio itself is left unconstrained;
232+
# pip's resolver picks a release compatible with pytest<8.
232233
- name: Constrain pytest for the test run
233234
run: |
234-
echo 'pytest<9.1' > "${{ runner.temp }}/constraints.txt"
235+
echo 'pytest<8' > "${{ runner.temp }}/constraints.txt"
235236
echo "PIP_CONSTRAINT=${{ runner.temp }}/constraints.txt" >> "$GITHUB_ENV"
236237
237238
- name: Install Kivy

0 commit comments

Comments
 (0)