Skip to content

PYTHON-6084 Streamline Evergreen Python interpreter selection for uv - #3074

Merged
blink1073 merged 1 commit into
mongodb:mainfrom
blink1073:PYTHON-6084
Sep 25, 2026
Merged

blink1073 merged 1 commit into
mongodb:mainfrom
blink1073:PYTHON-6084

Conversation

@blink1073

@blink1073 blink1073 commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

PYTHON-6084

Changes in this PR

Standardizes Evergreen Python selection for uv. Always use UV_PYTHON (default 3.10) with UV_PYTHON_SEARCH_PATH/UV_PYTHON_PREFERENCE pointing uv at the toolchain, falling back to uv-managed downloads otherwise.

The majority of the change is the regenerated tasks switching TOOLCHAIN_VERSION with UV_PYTHON.

Test Plan

Regenerated config is byte-identical; script logic exercised directly (defaults, free-threaded fallback, platform dirs); Evergreen tasks run on this PR.

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)? (Not necessary — CI tooling only.)
  • Is there test coverage? (Config regeneration + Evergreen runs.)
  • Is any followup work tracked in a JIRA ticket? If so, add link(s). (No followup.)

Checklist for Reviewer

  • Does the title of the PR reference a JIRA Ticket?
  • Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
  • Is all relevant documentation (README or docstring) updated?

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

Cross-platform interpreter resolution depends on real Evergreen host layouts and uv behavior that requires final human validation.

Review effort: Balanced
Findings: None

What changed in this PR

Standardizes Evergreen Python selection around uv-native configuration without changing driver code.

Changes:

  • Adds cross-platform toolchain discovery and managed-Python fallback.
  • Migrates generated tasks from TOOLCHAIN_VERSION to UV_PYTHON.
  • Propagates, scrubs, logs, and documents the new uv environment variables.
File Description
pr-body.md Documents implementation and validation.
CONTRIBUTING.md Updates Python-selection guidance.
.evergreen/​scripts/​utils.py Scrubs uv Python variables from subprocesses.
.evergreen/​scripts/​setup-uv-python.sh Implements interpreter selection and fallback.
.evergreen/​scripts/​setup_tests.py Propagates and adjusts uv settings.
.evergreen/​scripts/​generate_config.py Migrates generated task variables.
.evergreen/​scripts/​generate_config_utils.py Recognizes UV_PYTHON in names.
.evergreen/​run-tests.sh Logs interpreter search configuration.
.evergreen/​generated_configs/​tasks.yml Regenerates task Python variables.
.evergreen/​generated_configs/​functions.yml Regenerates function expansion lists.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@blink1073 blink1073 changed the title PYTHON-6084 Rework Evergreen Python interpreter selection for uv PYTHON-6084 Streamline Evergreen Python interpreter selection for uv Sep 25, 2026
@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@blink1073
blink1073 marked this pull request as ready for review September 25, 2026 12:20
@blink1073
blink1073 requested a review from a team as a code owner September 25, 2026 12:20
@blink1073
blink1073 merged commit dda56d3 into mongodb:main Sep 25, 2026
92 checks passed
@blink1073
blink1073 deleted the PYTHON-6084 branch September 25, 2026 17:24
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.

3 participants