Skip to content

[DRAFT&TEST] Apply PIP_CONSTRAINT when installing relenv[toolchain] in CI - #70107

Open
charzl wants to merge 3 commits into
masterfrom
fix/relenv-pip-constraint
Open

[DRAFT&TEST] Apply PIP_CONSTRAINT when installing relenv[toolchain] in CI#70107
charzl wants to merge 3 commits into
masterfrom
fix/relenv-pip-constraint

Conversation

@charzl

@charzl charzl commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

_install_requirements() in noxfile.py installs relenv[toolchain] via a bare pip install call, before PIP_CONSTRAINT is set up (that happens later, inside _upgrade_pip_setuptools_and_wheel() and the main requirements install). Without the constraint, this call can pull in a newer pip than the pip == 25.2 pinned in requirements/constraints.txt, and relenv's runtime patch of pip's InstallRequirement.install() breaks against newer pip's changed signature:

TypeError: InstallRequirement.install() got an unexpected keyword argument 'script_executable'

This was reproduced on CI Deps across all six platform jobs (Linux x86_64/arm64, macOS x86_64/arm64, Windows amd64/x86) on #70099 -- all failed with the same traceback at the pip install 'relenv[toolchain]' step.

Fix

Pass the same PIP_CONSTRAINT env var already used everywhere else in this function to this call too, keeping the install pinned to the pip version relenv's onedir actually ships with and is tested against.

Test plan

  • Confirmed requirements/constraints.txt already pins pip == 25.2 specifically because "pip 25.2 is the version that relenv's onedir ships with."
  • CI Deps jobs pass on this PR across all platforms.

🤖 Generated with Claude Code

_install_requirements() installs relenv[toolchain] via a bare
`pip install` before PIP_CONSTRAINT is set up (that happens later,
inside _upgrade_pip_setuptools_and_wheel() and the main requirements
install). Without the constraint, this call can pull in a newer pip
than the 25.2 pinned in requirements/constraints.txt, and relenv's
runtime patch of pip's InstallRequirement.install() breaks against
newer pip's changed signature:

    TypeError: InstallRequirement.install() got an unexpected
    keyword argument 'script_executable'

Reproduced on CI Deps across Linux (x86_64/arm64), macOS (x86_64/
arm64), and Windows (amd64/x86) -- all six failed with this same
traceback. Passing the same PIP_CONSTRAINT used everywhere else in
this function keeps this install pinned to the pip version relenv's
onedir actually ships with and is tested against.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@charzl charzl changed the title Apply PIP_CONSTRAINT when installing relenv[toolchain] in CI [DRAFT&TEST] Apply PIP_CONSTRAINT when installing relenv[toolchain] in CI Aug 21, 2026
The relenv[toolchain] install this function runs was completely
unversioned -- always installing whatever's latest on PyPI at CI
run-time, regardless of the relenv_version pinned everywhere else in
the repo (cicd/shared-gh-workflows-context.yml, and the
relenv-version inputs rendered from it into ci.yml/nightly.yml/
staging.yml/scheduled.yml). That drift is what let this exact class
of bug in: an unpinned relenv release picked up a pip API change
before relenv's own compatibility shim (see the parent commit) had
adapted to it.

RELENV_VERSION now reads the same relenv_version value out of
cicd/shared-gh-workflows-context.yml -- the single source of truth
tools/pkg/build.py already falls back to -- via a plain line-scan
instead of a full YAML parse, since this module is imported by bare
`nox` before any session venv (and therefore PyYAML) exists.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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