Skip to content

feat: update-requirements-constarints-pin-pip - #267

Open
tsunkara-sonata wants to merge 2 commits into
mainfrom
tsunkara/update-pin-pip
Open

feat: update-requirements-constarints-pin-pip#267
tsunkara-sonata wants to merge 2 commits into
mainfrom
tsunkara/update-pin-pip

Conversation

@tsunkara-sonata

Copy link
Copy Markdown
Contributor

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,

Copilot AI lite review requested due to automatic review settings August 14, 2026 04:50
@tsunkara-sonata
tsunkara-sonata requested review from a team as code owners August 14, 2026 04:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.2 and pip-tools==7.6.0 via requirements/constraints.txt (and regenerate lock files accordingly).
  • Bump pip/wheel/setuptools pins in requirements/pip.txt and update pip-tools pin in requirements/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.txt is overwritten by make 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.

Comment thread requirements/constraints.txt Outdated
Comment on lines +30 to +32
# 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.
Comment thread requirements/common_constraints.txt Outdated
Comment on lines +28 to +44

# 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

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.58%. Comparing base (7ed8c45) to head (895b6e6).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings August 14, 2026 05:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 upgrade working by avoiding pip 26.2+, but make piptools still hard-pins pip<25.3 (Makefile:39). That means CI paths that invoke piptools/upgrade will 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

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