Skip to content

fix: [make upgrade] always use pinned pip for bootstrapping - #708

Merged
brobro10000 merged 2 commits into
masterfrom
fix/make-upgrade-pip-bootstrap
Sep 18, 2026
Merged

brobro10000 merged 2 commits into
masterfrom
fix/make-upgrade-pip-bootstrap

Conversation

@brobro10000

Copy link
Copy Markdown
Member

What

The weekly "Upgrade Python Requirements" workflow has been failing for the last several runs with:

TypeError: RequirementCommand.make_requirement_preparer() missing 1 required keyword-only argument: 'allow_editables'

This is a pip/pip-tools API incompatibility: pip-tools==7.6.0's resolver calls pip's internal RequirementCommand.make_requirement_preparer() without a keyword arg (allow_editables) that newer pip releases now require.

Root cause

make upgrade's piptools-requirements target only installed the pinned pip-tools before compiling:

piptools-requirements: ## install tools prior to requirements
	pip install -q -r requirements/pip_tools.txt

It never installed this repo's own pinned pip first, so pip-compile bootstrapped against whatever (unconstrained, and in this case too-new) pip the CI runner happened to have, rather than a known-good pinned version — causing the crash on the very first pip-compile invocation.

Fix

  • Install requirements/pip.txt alongside pip-tools.txt (constrained via requirements/constraints.txt) before compiling, so a known-good pip/pip-tools pairing is always used to bootstrap:
    piptools-requirements: ## install tools prior to requirements
    	pip install -q -r requirements/pip.txt -r requirements/pip_tools.txt -c requirements/constraints.txt
  • Corrected the existing (already-broken) pip==26.2.1 / pip-tools==7.6.0 pins in requirements/pip.txt / requirements/pip_tools.txt to a compatible pairing (pip==26.2, pip-tools==7.6.1), which was needed once to break the cycle since the committed pin was already on the broken version.
  • Re-ran make upgrade to regenerate all requirements/*.txt files. pip is now properly constrained going forward via common_constraints.txt (pip<26.2.1, upstreamed in edx-lint).

This mirrors the same fix applied for the identical failure in edx/enterprise-subsidy.

Test plan

  • make upgrade completes locally without the allow_editables TypeError
  • Resulting requirements/pip.txt shows pip==26.2 constrained via common_constraints.txt
  • CI passes on this PR

pip-tools==7.6.0 is incompatible with newer pip releases (pip's
RequirementCommand.make_requirement_preparer() now requires an
allow_editables kwarg that pip-tools 7.6.0 doesn't pass), which was
crashing every weekly Upgrade Python Requirements run with:

    TypeError: RequirementCommand.make_requirement_preparer() missing
    1 required keyword-only argument: 'allow_editables'

The root cause is that `make upgrade` only installed the pinned
pip-tools before compiling, so pip-compile bootstrapped against
whatever ambient (unconstrained) pip the CI runner had, rather than
this repo's own known-good pinned pip. Install requirements/pip.txt
alongside pip-tools before running pip-compile so the correct,
compatible pip/pip-tools pairing is always used, mirroring the fix
applied in edx/enterprise-subsidy for the same failure.

Re-ran `make upgrade` to regenerate requirements/*.txt with pip-tools
7.6.1 and pip 26.2 (now properly constrained via common_constraints.txt).
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-17T16:15:31.287406Z 0e46146 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

The requirements bump in this PR pulls in edx-lint 6.2.0, whose PII
annotation pylint plugin now requires a [PII] pii-terms setting in
pylintrc, raising:

    ValueError: The 'pii_terms' setting must be configured.

and crashing the quality check entirely. Regenerated pylintrc via
`edx_lint write pylintrc` to pick up the new [PII] section (using
edx-lint's own default pii-terms list), per the file's own
instructions for staying in sync with edx-lint.
@brobro10000
brobro10000 merged commit 8d25048 into master Sep 18, 2026
6 checks passed
@brobro10000
brobro10000 deleted the fix/make-upgrade-pip-bootstrap branch September 18, 2026 11:46
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