Skip to content

fix(pypi): harden the WORKSPACE python detection in pip_repository#3744

Merged
aignas merged 5 commits intobazel-contrib:mainfrom
aignas:aignas.fix.harden-workspace-python-version
Apr 29, 2026
Merged

fix(pypi): harden the WORKSPACE python detection in pip_repository#3744
aignas merged 5 commits intobazel-contrib:mainfrom
aignas:aignas.fix.harden-workspace-python-version

Conversation

@aignas
Copy link
Copy Markdown
Collaborator

@aignas aignas commented Apr 27, 2026

A fixup to #3737

@aignas aignas requested a review from rickeylev as a code owner April 27, 2026 13:37
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Python version detection logic in pip_repository.bzl to use a Python script instead of the --version flag for more precise output. Feedback suggests further hardening the command by disabling site-packages initialization with the -S flag, improving error messages with diagnostic information, and handling potential multi-line output for better robustness.

Comment thread python/private/pypi/pip_repository.bzl Outdated
@aignas
Copy link
Copy Markdown
Collaborator Author

aignas commented Apr 29, 2026

PTAL

Copy link
Copy Markdown
Collaborator

@rickeylev rickeylev left a comment

Choose a reason for hiding this comment

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

lgtm other than the 1 comment

Comment thread python/private/pypi/pip_repository.bzl Outdated
@aignas aignas enabled auto-merge April 29, 2026 04:50
@aignas aignas added this pull request to the merge queue Apr 29, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 29, 2026
@aignas aignas added this pull request to the merge queue Apr 29, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 29, 2026
@aignas aignas added this pull request to the merge queue Apr 29, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 29, 2026
@aignas aignas added this pull request to the merge queue Apr 29, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 29, 2026
@aignas aignas merged commit 78ae1f0 into bazel-contrib:main Apr 29, 2026
4 checks passed
@aignas aignas deleted the aignas.fix.harden-workspace-python-version branch April 29, 2026 14:58
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