Skip to content

fix Python tasks on distros with too-old Python (part 2) - #1252

Merged
kevinAlbs merged 1 commit into
mongodb:masterfrom
kevinAlbs:fix-python-uv-fallback
Oct 16, 2026
Merged

kevinAlbs merged 1 commit into
mongodb:masterfrom
kevinAlbs:fix-python-uv-fallback

Conversation

@kevinAlbs

@kevinAlbs kevinAlbs commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #1246 to fixes failures of test-python / test-python-integ on rhel-82-arm64.

Details

Task failures are related to dropping Python 3.10. rhel-82-arm64 distro has Python 3.10, so find_pythons triggers a "No Python interpreter" error (example)

#1246 was a previous attempt to fix and passed because it was branched was before #1242 merged. This PR now creates a new virtual environment, even if find_pythons returns no system Python.

…s finds none

PYTHON-6139 (mongodb#1242) tightened _probe_pythons to require Python >= 3.11.
On distros whose MongoDB toolchain tops out at 3.10 (e.g. rhel-82-arm64)
find_pythons now returns nothing, so both 'test-python' and
'test-python-integ' fail at interpreter discovery ("No Python
interpreter found!") before the uv fallback in integ-test.sh can run.

Fall back to a uv-provisioned Python 3.11 when interpreter discovery
yields nothing: in test.sh after ensure_uv, and in integ-test.sh by
moving the uv provisioning ahead of the guard (also collapsing the
duplicated uv blocks). Restores mongodb#1246's intent on top of mongodb#1242.
@kevinAlbs
kevinAlbs requested a review from sleepyStick October 16, 2026 19:43
@kevinAlbs kevinAlbs changed the title test-python: fall back to uv-provisioned Python 3.11 when find_pythons finds none fix Python tasks on distros with too-old Python (part 2) Oct 16, 2026
@kevinAlbs
kevinAlbs marked this pull request as ready for review October 16, 2026 19:43
@kevinAlbs
kevinAlbs requested a review from a team as a code owner October 16, 2026 19:43

@sleepyStick sleepyStick left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!!

@kevinAlbs
kevinAlbs merged commit d8c9b3c into mongodb:master Oct 16, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants