Commit efd4f6d
fix: correct uv sync/export flags that silently dropped project deps
Found via real CI runs after opening the PR (unit tests, Quality
Others, and the ReadTheDocs build all failed):
1. Makefile's test-requirements used `uv sync --only-group testing`,
which EXCLUDES [project.dependencies] entirely (confirmed: `--only-group`
replaces the dependency set rather than adding to it, unlike `--group`).
This meant Django, XBlock, and the rest of the actual application were
never installed for test runs -- ModuleNotFoundError: No module named
'xblock' on every unit test shard. Fixed to
`--no-default-groups --group testing`, matching what tox-uv itself
generates for the equivalent tox environment.
2. .readthedocs.yaml had the same bug in its doc-requirements.txt export
(`--only-group doc`). Since [project.dependencies] were excluded from
that export, the subsequent `pip install -e .` resolved the whole
dependency tree completely unconstrained by uv.lock's
[tool.uv].constraint-dependencies -- picking setuptools==82.0.1 (violates
setuptools<82) and Django==6.0.6 (violates Django<6.0). The setuptools
violation broke fs/pyfilesystem2's pkg_resources import, crashing the
Sphinx build via Django app loading. Fixed to `--group doc` plus
`--no-deps` on the `pip install -e .` step, so dependencies only ever
come from the properly-constrained export.
3. scripts/xsslint_config.py's SKIP_DIRS didn't exclude .venv. Under the
old pip-compile system, dependencies installed into the system Python
outside the repo checkout, so this never mattered. Now that `uv sync`
creates .venv/ inside the checkout, xsslint's directory walk (which
defaults to scanning the whole cwd) swept up thousands of vendored
third-party files, inflating violations from 64 (the accepted baseline)
to 316.
Verified all three: real pytest run (59 passed) plus full Django
`manage.py check` for both LMS and CMS against the corrected
test-requirements; a local simulation of the RTD build job sequence
confirms Django==5.2.15/setuptools==81.0.0 (both constraint-compliant)
and a successful Sphinx build.
Audited every other `--only-group` usage introduced in this migration
(assets.txt compat export, semgrep.yml) -- both are intentionally
project-dependency-free, matching the original files' documented
behavior, and their CI checks already passed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent d07c449 commit efd4f6d
3 files changed
Lines changed: 15 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
| 79 | + | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
0 commit comments