feat: update-requirements-constarints-pin-pip - #267
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the service’s pinned Python dependency lock files and adds/adjusts pip/pip-tools constraints to prevent the scheduled “Upgrade Requirements” workflow (make upgrade) from breaking due to pip ↔ pip-tools incompatibilities.
Changes:
- Pin
pip<26.2andpip-tools==7.6.0viarequirements/constraints.txt(and regenerate lock files accordingly). - Bump
pip/wheel/setuptoolspins inrequirements/pip.txtand updatepip-toolspin inrequirements/pip-tools.txt. - Refresh compiled requirements across base/dev/test/quality/validation/doc/production with the new constraints applied.
Critical / high severity notes (custom):
requirements/common_constraints.txtis overwritten bymake upgrade(downloaded from edx-lint), so repo-local edits there are not durable and will cause recurring diff churn unless managed upstream or removed.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| requirements/base.txt | Regenerated base lockfile with updated transitive pins. |
| requirements/common_constraints.txt | Adds a pip constraint/commentary (but this file is overwritten by make upgrade). |
| requirements/constraints.txt | Adds repo-level pip/pip-tools pins to keep pip-compile working. |
| requirements/dev.txt | Regenerated dev lockfile with updated transitive pins (incl. pip-tools/wheel). |
| requirements/doc.txt | Regenerated doc lockfile with updated transitive pins. |
| requirements/pip-tools.txt | Updates pinned pip-tools (and wheel) used by make upgrade. |
| requirements/pip.txt | Updates pinned pip/wheel/setuptools used during upgrade/bootstrap. |
| requirements/production.txt | Regenerated production lockfile with updated transitive pins. |
| requirements/quality.txt | Regenerated quality lockfile with updated transitive pins. |
| requirements/test.txt | Regenerated test lockfile with updated transitive pins. |
| requirements/validation.txt | Regenerated validation lockfile with updated transitive pins. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # pip 26.2+ is incompatible with pip-tools 7.6.0 (latest pip-tools release only | ||
| # supports pip up to 26.1), which breaks `make upgrade`. Remove this once a | ||
| # newer pip-tools release restores pip 26.2+ compatibility. |
|
|
||
| # 2026-08-11: pip-tools is only tested against the latest pip released at the time | ||
| # pip-tools was released; also, pip-tools package dependencies are extremely permissive | ||
| # about the pip version required, so the dependency resolver will not prevent an unwanted | ||
| # pip upgrade which would break pip-tools. The end result is that pip MUST be constrained | ||
| # by all pip-tools users in order to avoid potentially weeks-long lapses in pip <-> | ||
| # pip-tools compatibility. We've constrained pip here in common_constraints.txt in the | ||
| # past, but always removed it once the issue was "fixed". Removing this constraint was | ||
| # always a mistake. | ||
| # | ||
| # This is a semi-permanent constraint and should be manually bumped after each pip-tools | ||
| # release. | ||
| # | ||
| # Exceptional conditions for removal: | ||
| # - We stop using pip-tools, OR | ||
| # - We migrate to the proposed `pip-tools[stable]` extra: https://github.com/jazzband/pip-tools/pull/2257 | ||
| pip<26.2.1 # Known to work with pip-tools==7.6.1 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #267 +/- ##
=======================================
Coverage 87.58% 87.58%
=======================================
Files 157 157
Lines 13396 13396
Branches 1297 1297
=======================================
Hits 11733 11733
Misses 1358 1358
Partials 305 305 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.
Suppressed comments (2)
requirements/constraints.txt:32
- This comment says pip-tools 7.6.0 "supports pip up to 26.1", but the lockfile in this PR pins pip to 26.1.2 and the constraint is
pip<26.2. To avoid ambiguity/misinterpretation, consider wording this as "supports pip <26.2" (or "supports pip 26.1.x").
# pip 26.2+ is incompatible with pip-tools 7.6.0 (pip-tools 7.6.0
# supports pip up to 26.1), which breaks `make upgrade`. Remove this once a
# newer pip-tools release restores pip 26.2+ compatibility.
requirements/constraints.txt:33
- The new pip/pip-tools constraints are intended to keep
make upgradeworking by avoiding pip 26.2+, butmake piptoolsstill hard-pinspip<25.3(Makefile:39). That means CI paths that invokepiptools/upgradewill start from a pip version that doesn't match the newly documented compatibility window, which can undermine the stated fix and make the comments here misleading.
Consider updating the Makefile pip pin to align with this constraint (e.g., pip<26.2 or installing from requirements/pip.txt) so the runtime pip version used by pip-tools matches the constraints being introduced here.
# pip 26.2+ is incompatible with pip-tools 7.6.0 (pip-tools 7.6.0
# supports pip up to 26.1), which breaks `make upgrade`. Remove this once a
# newer pip-tools release restores pip 26.2+ compatibility.
pip<26.2
Description:
Upgrade requirements
The scheduled "Upgrade Python Requirements" GitHub Action was failing with:
TypeError: RequirementCommand.make_requirement_preparer() missing 1 required keyword-only argument: 'allow_editables'
Fix:
Added constraints in requirements/constraints.txt to pin pip<26.2 and pip-tools==7.6.0, the last verified-compatible combination.
Ran make upgrade to regenerate the lock files with the new constraints in place,