Skip to content

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

Open
aignas wants to merge 4 commits intobazel-contrib:mainfrom
aignas:aignas.fix.harden-workspace-python-version
Open

fix(pypi): harden the WORKSPACE python detection in pip_repository#3744
aignas wants to merge 4 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
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.

1 participant