fix: check for multiprocessing in a --concurrency list - #2270
Merged
nedbat merged 3 commits intoAug 23, 2026
Merged
Conversation
Member
|
Thanks again. Would you like me to credit you in the Contributors list? |
nedbat
added a commit
that referenced
this pull request
Aug 23, 2026
Member
|
This is now released as part of coverage 7.16.0. |
1 task
Nitwizztor
approved these changes
Sep 1, 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.
coverage runrefuses run-affecting command-line options alongside--concurrency=multiprocessing, since they cannot reach the subprocesses. The check compares the whole option value with==, so it never fires for a comma list, and the run proceeds with the parent measuring branch coverage and the subprocesses not:The comma form is not exotic,
doc/migrating.rsttells people to write it: "Now that must be explicitly enabled with--concurrency=multiprocessing,thread". The single value form was refused correctly the whole time.The fix splits on commas, which is what
cmdline.pyalready does with the same string a few hundred lines up when it builds theCoverageobject, so the two now agree on what the option means.I checked that
--concurrency=thread --branchstill exits 0, thatmultiprocessing,threadwith no extra flags still exits 0, and thatthread,multiprocessing --branchis refused as well.AI-assisted: written with Claude Code, reviewed and tested by me before sending.