Repository navigation
CI: pin ubuntu-24.04 in test matrices; report pip output on #require failures - #111
Merged
Merged
Conversation
…failures (#110) GitHub's ubuntu-latest image moved to Ubuntu 26.04: setup-python has no Python 3.9 there, and test_load_algorithm_with_auto_install fails on 3.14 (pip install six). Both jobs fail on main (0b8514c, NEWS-only change) and again on re-run; they passed on Ubuntu 24.04 the day before. - ci.yml and release.yml test/verify matrices: ubuntu-24.04 instead of ubuntu-latest, until #110 is handled (release.yml's verify job would otherwise block a release). - fz/algorithms.py: the #require auto-install ran pip with check_call(..., stderr=PIPE), which never reads the pipe, so the RuntimeError always ended with an empty "Error:". pip now runs with subprocess.run(capture_output= True); the message ends with the last lines of its stderr, else stdout, or states its exit status when it printed nothing. - tests/test_algorithm_require_errors.py (3 tests, fail before the fix). - NEWS (2.0, Robustness). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RjXvVRjM6aMvKvvSFoxpZ6
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.
Pull Request
Description
GitHub's
ubuntu-latestrunner image moved to Ubuntu 26.04 overnight. Onmain(0b8514c, a NEWS-only change), twoci.ymljobs now fail, again after one re-run. Both passed on Ubuntu 24.04 the day before (#108).The version '3.9' with architecture 'x64' was not found for Ubuntu 26.04.test_demos.py::test_load_algorithm_with_auto_installfails inpip install sixwith an emptyError:.release.yml'sverifyjob uses the same matrix, so publishing 2.0 is blocked until this is fixed.Related Issues
Relates to #110 (move back to Ubuntu 26.04: Python 3.9, and diagnosing pip on 3.14). This PR is the short-term mitigation plus the fix that makes the 3.14 cause visible.
Type of Change
#require:auto-install)Changes Made
ci.yml,release.yml: the OS × Python test/verify matrices useubuntu-24.04instead ofubuntu-latest. This is the environment in which everything was green the day before, and the supported versions do not change. Non-matrix jobs (lint, build, publish) keepubuntu-latestwith Python 3.11, which is available there.fz/algorithms.py: the algorithm#require:auto-install ransubprocess.check_call([... pip install pkg], stdout=DEVNULL, stderr=PIPE).check_callnever reads that pipe, soCalledProcessError.stderrwas alwaysNoneand theRuntimeErroralways ended with an emptyError:. A long pip output could also fill the pipe and block. pip now runs throughsubprocess.run(capture_output=True, text=True), and the message ends with the last lines of pip's stderr, else its stdout, or states the exit status when pip printed nothing.tests/test_algorithm_require_errors.py(3 tests,subprocess.runmocked): stderr is reported, stdout is used when stderr is empty, and a silent failure states its status. All three fail onmainand pass with the fix.NEWS.md: one entry in the 2.0 "Robustness" section (the2.0tag does not exist yet).Testing Performed
main(3 failed), pass with the fix (3 passed).tests/test_demos.py, including the real auto-install ofsix: passes.ERROR: No matching distribution found for fz_surely_missing_pkg_110; before, it wasError:with nothing after it.test_python_version_support,test_check_dist,test_skill_static,test_docs_consistency: 31 passed. The CI's blockingflake8check: 0 errors. Both workflow YAMLs parse.release.ymlis not run by this PR's CI; after merging,main's CI and the release'sverifyjob will useubuntu-24.04.Generated by Claude Code