Pin black and isort in requirements/test.txt for reproducible lint#680
Merged
Conversation
black and isort were unpinned in requirements/test.txt, so CI always installed the newest release. When isort 8.0.1 and black 26.5.1 shipped, their changed formatting output started failing 'Check linting' on otherwise-unchanged trees -- lint was passing or failing depending only on when the job happened to run. Pin both to the current versions (the ones the tree is already formatted for) so linting is reproducible. Bump them deliberately, together with a tree-wide reformat, in future.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #680 +/- ##
=======================================
Coverage 94.09% 94.09%
=======================================
Files 102 102
Lines 11108 11108
Branches 1198 1198
=======================================
Hits 10452 10452
Misses 557 557
Partials 99 99 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
black 26.5.1 and isort 8.0.1 require Python >= 3.10, so pinning them unconditionally broke 'pip install -r requirements/test.txt' on the Python 3.9 test-matrix jobs. black/isort are lint-only and only run in the lint job (PYTHON_LATEST), so pin them on 3.10+ and fall back to an unpinned install on 3.9, where they are installed but never invoked.
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.
Description
blackandisortwere unpinned inrequirements/test.txt, so CI always installed the newest release. When isort 8.0.1 and black 26.5.1 shipped, their changed formatting output began failing theCheck lintingjob on otherwise-unchanged trees — lint started passing or failing depending only on when the job happened to run, not on the diff. This is the root cause of the recent lint red across open PRs.This pins both formatters to the current versions (the ones the tree is expected to be formatted for), matching the existing
flake8==5.0.4pin. Bump them deliberately in future, together with a tree-wide reformat.Important: merge ordering
This pin does not by itself make
master's lint green —mastercurrently has formatting/E402drift that predates this change. #677 ("Fix CI lint formatting drift in tests and aerospike store") already fixes all of it and, I verified, lints 100% clean under exactly these pinned versions (0 isort / 0 black / 0 flake8). #677 also moves the fragile pypy3.9 job to a non-requiredcontinue-on-errorjob.Recommended order:
masterlint + de-blocks pypy3.9), thenUntil #677 lands, this PR's own
Check lintingjob will remain red (it runs against the un-reformattedmastertree) — that's expected, not a problem with the pin.Generated by Claude Code