Stabilize the pip check lint step - #9803
Conversation
- Bump pip-tools 7.5.3 -> 7.6.1 (7.5.x cannot run under pip >= 26, which removed pip._internal.utils.compat.stdlib_pkgs) - Recompile requirements/dev.txt with --allow-unsafe so pip and setuptools stay pinned. Without the flag, pip-compile silently drops the setuptools pin; since CI installs with --no-deps into a Python 3.13 venv (where virtualenv no longer seeds setuptools), zope-* and pip-tools then fail pip check with 'requires setuptools, which is not installed'. The flag is recorded in the file header, so dependabot keeps it on future bumps. - Replace the grep-filtered pip check in tox.ini with a plain pip check. The mozdetect/pyqt5 suppression is stale: PyQt5 5.15.11 ships cp38-abi3 wheels that install fine on Python 3.13, and pyqt5 is pinned in common.txt. With no suppression needed, the exit-code-driven pip check replaces the fragile output-emptiness bash construct (which had already needed one fix to ignore the 'No broken requirements found.' message).
✅ Deploy Preview for treeherder ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
A note on That danger is essentially gone — modern pip handles self-upgrades fine, the pip-tools docs recommend the flag, and the maintainers have discussed making it the default. Meanwhile the default (omit those pins from the output) is actively harmful for our setup:
So the flag really means "let the lockfile pin the packaging toolchain too," which for a hash-pinned |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9803 +/- ##
========================================
Coverage 83.67% 83.67%
========================================
Files 640 640
Lines 38864 38864
Branches 3488 3488
========================================
Hits 32518 32518
+ Misses 6199 5956 -243
- Partials 147 390 +243 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Problem
Dependabot's pip-tools 7.6.1 bump (#9788) fails the
buildsCI job. The failure is a true positive from thepip checkstep intox -e linters: recompilingrequirements/dev.txtwith pip-tools' default settings drops thesetuptoolspin (pip-compile treats pip/setuptools as "unsafe" and omits them unless--allow-unsafeis passed). Since CI installs requirements with--no-depsinto a Python 3.13 venv — where virtualenv no longer seeds setuptools — the zope-* packages and pip-tools itself end up with an unmetsetuptoolsrequirement.Separately, the
pip checkinvocation had grown a fragile bash construct that filters expected output withgrep -vand fails if any output remains. It already needed one follow-up fix (ignoring the "No broken requirements found." success message), and its original justification is stale: PyQt5 5.15.11 shipscp38-abi3wheels that install fine on Python 3.13, and pyqt5 is pinned incommon.txt(it installs successfully in CI today).Changes
pip._internal.utils.compat.stdlib_pkgs)requirements/dev.txtwith--allow-unsafesopipandsetuptoolsstay pinned. The flag is recorded in the file header, so dependabot (which re-runs the header command) keeps it on future bumps.--allow-unsafeto therequirements/common.txtheader as well (header-only change — its dependency graph contains no unsafe packages today, but future recompiles stay consistent).tox.iniwith a plain, exit-code-drivenpip check— no suppression regexps left to go stale.Verification
Reproduced the CI linters flow in a
python:3.13linux/amd64 container: fresh venv,pip install --no-depsof both compiled requirements files, thenpip check→No broken requirements found.(exit 0).