Repository navigation
Test on the oldest and newest supported Python in CI - #55
Merged
Merged
Conversation
A matrix job sets up Python 3.10 and 3.14 with actions/setup-python and creates the test venv from it via ORG_GRADLE_PROJECT_basePython, as the shared reusable workflow cannot set up Python. It runs next to the shared build, which keeps publishing from main exactly once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJmHQ3jHRbVdpwUiNUkApG
Test with the newest Python verified with the pinned jep rather than "the latest", correct the pyenv advice (it needs --enable-shared), and keep in CLAUDE.md only the Gradle daemon LD_LIBRARY_PATH gotcha. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJmHQ3jHRbVdpwUiNUkApG
morisil
added a commit
that referenced
this pull request
Nov 10, 2026
…v's version (#51) * Make the base Python of the test venv configurable and check its version (#11) createPythonVenv used python3 from the PATH of the Gradle daemon, which can be an old Python, e.g. the one of Xcode on macOS, failing only later, when pip finds no matching jep. The base Python can now be set with the basePython Gradle property (also ORG_GRADLE_PROJECT_basePython, for CI), and a Python older than 3.10 fails with a clear message before the venv is created. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJmHQ3jHRbVdpwUiNUkApG * Validate an existing test venv and recreate it when its base Python changed (#11) An existing .venv skipped the version check, so a venv already created by an old Python kept failing on jep. The base Python is now checked on every build, isolated (-I), with the comparison done by Python itself, a failing Python reported with its stderr. The base Python and its version are recorded in .venv/base-python.txt after a successful creation, and .venv is created again when the record is missing (a pre-existing or half-made venv, e.g. without pip when ensurepip is unavailable) or differs. A failed creation deletes the half-made .venv and reports the output of venv. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJmHQ3jHRbVdpwUiNUkApG * Judge the test venv by its own Python, keep it unless basePython is set (#11) A daemon whose python3 differs from the one of the shell, e.g. of an IDE, failed the build or recreated a working .venv. Now .venv is kept when its own Python runs, is 3.10 or newer, and has pip; only then is python3 not checked at all. A chosen basePython also recreates .venv when it is of another base Python, compared by the prefix and version of the interpreters, not by paths. The previous .venv is moved aside while creating the new one and restored when that fails, deleted without following symbolic links. The recorded base Python is an input of the tests, so they rerun on another one. A base Python failing to run, like Python 2 rejecting -I, is reported with the required version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJmHQ3jHRbVdpwUiNUkApG * Restore the previous test venv on any failure, treat a blank basePython as unset (#11) An empty basePython, like an empty value of a CI matrix, now means python3 with the existing .venv kept. The previous .venv is restored on any failure of the creation, also an exception or a cancelled build, and a .venv.previous left by a killed build is restored on the next one instead of deleted. A venv with a dangling python is reported as incomplete, not as created anew, and the comment on -I no longer claims it skips sitecustomize. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJmHQ3jHRbVdpwUiNUkApG * Test on the oldest and newest supported Python in CI (#55) * Build on CI with the minimum and the latest supported Python (#35) A matrix job sets up Python 3.10 and 3.14 with actions/setup-python and creates the test venv from it via ORG_GRADLE_PROJECT_basePython, as the shared reusable workflow cannot set up Python. It runs next to the shared build, which keeps publishing from main exactly once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJmHQ3jHRbVdpwUiNUkApG * Run only the tests in the Python matrix, cancel superseded PR runs (#35) Test with the newest Python verified with the pinned jep rather than "the latest", correct the pyenv advice (it needs --enable-shared), and keep in CLAUDE.md only the Gradle daemon LD_LIBRARY_PATH gotcha. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJmHQ3jHRbVdpwUiNUkApG --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <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.
Fixes #35
Fix
CI ran the tests only with the runner's default Python, so nothing ran jep, PLAN or the environment probe on a real 3.10, the minimum the README states.
.github/workflows/build-python.yml(pull requests and pushes tomain): a matrix over Python 3.10 (the oldest supported by jep) and 3.14 (the newest verified with the pinned jep),fail-fast: false.Each leg: checkout, setup-java (the same
vars.DEFAULT_JAVA_*as the shared workflow), setup-python, setup-gradle, then./gradlew testwithORG_GRADLE_PROJECT_basePythonset to the setup-python interpreter — so the test venv is created from it and jep compiled against it.xemantic/.githubbuild-gradle.ymlcannot set up Python;build-pr.yml/build-main.ymlare unchanged, somainstill publishes exactly once.concurrencycancels superseded PR runs, nevermainpushes.DEVELOPMENT.mddescribes the matrix and how to bump it, and that a Python outside the system library directories needs itslibonLD_LIBRARY_PATH(uv), or a shared build (pyenv--enable-shared) —actions/setup-pythonsetsLD_LIBRARY_PATHon Linux.CLAUDE.mdgains the gotcha that a running Gradle daemon does not pass a changedLD_LIBRARY_PATHto the test JVM.Verification
GitHub Actions cannot run locally, so the workflow will first run on this PR. Locally:
actionlint1.7.7 is clean for all workflows..venvcreated from it through-PbasePython, jep compiled against it) — run by both the fixer and the reviewer — and on 3.14.10.LD_LIBRARY_PATH, 35 of 62 tests fail withlibpython3.10.so.1.0: cannot open shared object file— CI is covered by setup-python (src/find-python.tsof v7), the user-facing side is filed as jep cannot load libpython of a Python outside the system library directories on Linux #54.Review
/code-review, independent reviewer): no blocking findings. Minor findings applied in 2d74af2: pyenv advice, CLAUDE.md deduplicated,testinstead of a fullbuildper leg, "newest verified" wording, a concurrency group.Follow-ups filed
libpythonof a Python outside the system library directories on Linux (found while running the suite on 3.10).🤖 Generated with Claude Code
https://claude.ai/code/session_01FJmHQ3jHRbVdpwUiNUkApG