Stop free-threaded CI jobs failing in setup before tests run - #1089
Merged
Conversation
Three matrix entries have been failing without ever running pytest --
"run tests" shows as skipped because an earlier step aborted under
"bash -e". Both causes are environment drift, not code: all four
free-threaded jobs passed on master on 2026-07-05.
3.13t (ubuntu + macos): "pip install pytest pytest-asyncio hypothesis"
fails because hypothesis has no free-threaded 3.13 wheel and its source
build pulls pyo3-ffi, which reports "PyO3 does not support the
free-threaded build of CPython versions below 3.14". Install hypothesis
separately and best-effort.
That alone isn't enough: test_runningstats.py and test_scalene_json.py
import hypothesis at module scope, and a collection error there
interrupts the *entire* pytest session, not just those two files. Both
now call pytest.importorskip("hypothesis"), matching the convention
already used for torch and numpy.
3.14t (ubuntu): "sudo apt-get install -y gdb" exits 100 on a 404 for
libc6-dbg -- the image's package index is older than the mirror's
contents. Run apt-get update first, and don't let a missing gdb stop the
job: it's only used by the optional "Collect crash backtraces" step,
which is already "|| true" guarded.
Verified locally: without hypothesis installed, the two modules used to
abort collection ("Interrupted: 2 errors during collection") and now
report "2 skipped" with exit 0; with hypothesis present they still run
(4 passed). Full suite unchanged at 446 passed, 13 skipped. The apt
change can only be exercised on an Ubuntu runner.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three matrix entries —
run-tests (ubuntu-latest, 3.13t),(macos-latest, 3.13t)and(ubuntu-latest, 3.14t)— have been red without ever running pytest. In each,run testsshows as skipped because an earlier setup step aborted underbash -e.Both causes are environment drift, not code: all four free-threaded jobs passed on master's 2026-07-05 run, and the failures reproduce identically on unrelated PRs (#1087, #1088).
3.13t —
hypothesiscan't be built for free-threaded 3.13No wheel exists for
cp313t, so pip builds from source and its dependency chain pullspyo3-ffi. Installing it best-effort fixes the step.That alone isn't sufficient.
tests/test_runningstats.pyandtests/test_scalene_json.pyimport hypothesis at module scope, and a collection error there interrupts the entire pytest session:So both modules now call
pytest.importorskip("hypothesis"), matching the convention already used fortorch(test_torch_profiler.py) andnumpy(test_issue1032_core_utilization_clamp.py).3.14t — apt 404 on
libc6-dbgThe runner image's package index is older than the mirror's contents. Adds
apt-get updatefirst, and stops a missing gdb from failing the job — gdb is only used by the optionalCollect crash backtracesstep, which is already|| trueguarded.Verification
Interrupted: 2 errors during collection, non-zero exit"hypothesis absent" was exercised in a real venv without the package, not simulated. The apt change can only be exercised on an Ubuntu runner, so this PR's own 3.14t job is the test.
Note, not addressed here
ulimit -c unlimitedruns in its own step, and eachrun:block is a separate shell, so it doesn't apply to the later pytest step — core dumps likely were never actually enabled, which would leaveCollect crash backtraceswith nothing to find. Fixing that means restructuring where the limit is set, which is beyond this PR's scope of un-breaking the setup steps.🤖 Generated with Claude Code