unstructured
95fea7e5 - fix(deps): switch from pip-compile to uv pip compile (#4202)

Commit
1 day ago
fix(deps): switch from pip-compile to uv pip compile (#4202) ## Summary Switches dependency compilation from pip-compile to uv pip compile to fix Renovate compatibility issues with the `--no-strip-extras` flag. ## Problem Renovate's pip-compile manager has a bug where it only supports `--no-strip-extras` for `uv pip compile`, not for regular `pip-compile`. This causes 32 warnings in every Renovate run: ``` WARN: pip-compile error errorMessage: "Option --no-strip-extras not supported (yet)" ``` This blocks Renovate from creating security vulnerability PRs for Python dependencies. ## Solution Switch from `pip-compile` to `uv pip compile` which: - ✅ Supports `--no-strip-extras` flag in Renovate - ✅ 10-100x faster compilation times - ✅ Drop-in replacement with same command structure - ✅ Aligns with unstructured-inference and platform-plugins repos ## Implementation Details The Makefile now uses: - `--python-version 3.10` flag to ensure consistent dependency resolution - `--no-emit-package pip --no-emit-package setuptools` flags (matches pip-compile's "unsafe" package behavior) - Proper shell `for` loop instead of `$(foreach)` for better variable expansion - `--upgrade` flag on all compile commands ## Expected Diff Changes The following differences in `.txt` files are expected and safe when switching from pip-compile to uv pip compile: 1. **Header format** - Just formatting, no functional change 2. **Constraint paths** - uv normalizes relative paths with `./` prefix (`deps/constraints.txt` → `./deps/constraints.txt`) 3. **`coverage[toml]` → `coverage`** (test.txt) - Since we use `.coveragerc` for config (not `pyproject.toml`), the `[toml]` extra isn't needed. pip-compile was including it unnecessarily. 4. **`importlib-metadata` + `zipp` added** (dev.txt) - These are Python 3.10 backports (stdlib in 3.11+). uv correctly includes them for Python 3.10. 5. **Dependency comment cleanup** - Removed references to packages that are no longer in the dependency tree ## Testing ```bash make pip-compile ``` ## References - Renovate source: [common.ts](https://github.com/renovatebot/renovate/blob/main/lib/modules/manager/pip-compile/common.ts) - uv pip compile docs: https://docs.astral.sh/uv/pip/compile/ - Related to infrastructure Renovate workflow setup <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Migrates dependency compilation to `uv pip compile` and refreshes all requirement lockfiles accordingly. > > - Replace `pip-compile` with `uv pip compile` in `requirements/Makefile` (adds `--python-version 3.10`, `--upgrade`, `--no-emit-package pip/setuptools`, and uses a shell `for` loop for batch compilation; includes `--no-strip-extras` for base files) > - Regenerate `requirements/*.txt` with uv: new uv headers, normalized `./`-prefixed paths (including constraints), and updated "via" comments > - Minor dependency changes: `dev.txt` now includes `importlib-metadata` and `zipp` for Python 3.10 compatibility; otherwise versions remain consistent > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0584298bc5f7ce0393c527e605ac0d7105ecf9e9. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
Author
Parents
Loading