Conversation
511d39a to
e2e5f45
Compare
Switches constraint management from the bespoke sync_constraints.py script (which downloaded common_constraints.txt from GitHub via HTTP) to the new `edx_lint write_uv_constraints` command added in openedx/edx-lint#537. The new approach: - Uses the constraints bundled inside the installed edx-lint package, so no network call is needed at upgrade time - Merges repo-specific constraints from constraints.txt (replaces the greenlet pin that was hardcoded inside sync_constraints.py) - Local pins can override global ones by package name, which is useful when testing against a specific version - Writes a DO NOT EDIT comment block on first run and preserves it on subsequent runs The requirements/common_constraints.txt download cache is removed since the bundled copy inside edx-lint is now the authoritative source. Requires edx-lint >= next release (openedx/edx-lint#537). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
e2e5f45 to
04d9274
Compare
Contributor
Author
|
@bmtcril edx-lint has published 6.1.0 with the new command, this should now be safe to merge |
bmtcril
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the bespoke
sync_constraints.pyscript with the newedx_lint write_uv_constraintscommand (openedx/edx-lint#537), which is the shared tooling for managing[tool.uv].constraint-dependenciesacross openedx repos.What changed
Deleted
sync_constraints.pyandrequirements/common_constraints.txt— the script downloadedcommon_constraints.txtfrom GitHub and updatedpyproject.toml; the downloaded cache is no longer needed since the constraints are bundled inside edx-lint itself.Created
constraints.txt— repo-specific constraints file at the repo root. The greenlet pin that was previously hardcoded insidesync_constraints.pylives here now.Updated
pyproject.toml— the[tool.uv].constraint-dependenciessection is now written byedx_lint write_uv_constraintswith a DO NOT EDIT comment. The redundantoverride-dependenciessection (which duplicated the same constraints) has been removed.Updated
Makefile—sync-constraintsreplaced;upgradenow runs:Constraints are written first so that
uv lock --upgraderespects them from the start and can't upgrade packages past the new limits. Since edx-lint is not a project dependency here (it's fetched via--with), it's always the latest version regardless of ordering, so there's no need for a separate re-lock step.Using
uv run --with edx-lintmeans edx-lint is not a project dependency — uv fetches the latest version in an ephemeral environment each time, so new global constraints are picked up automatically on the nextmake upgrade.Dependency
Requires openedx/edx-lint#537 to be merged and released before
make upgradewill work end-to-end. Theconstraint-dependenciesinpyproject.tomlwas pre-populated using the development version of that branch.