bpo-26903: Limit ProcessPoolExecutor to 61 workers on Windows#13132
bpo-26903: Limit ProcessPoolExecutor to 61 workers on Windows#13132zooba merged 3 commits intopython:masterfrom
Conversation
Co-Authored-By: brianquinlan <brian@sweetapp.com>
| raise ValueError("max_workers must be greater than 0") | ||
| elif (sys.platform == 'win32' and | ||
| max_workers > _MAX_WINDOWS_WORKERS): | ||
| raise ValueError( |
There was a problem hiding this comment.
Should we consider automatically changing max_workers to 61 instead? That would make for a nicer API for people using max_workers=os.cpu_count(), and it would make code like what was in Black before https://github.com/python/black/pull/838/files work unchanged.
On the other hand, it may be unexpected that we silently use fewer workers than the user asked for.
There was a problem hiding this comment.
I thought silently using fewer processes could be surprising. I also think that it's pretty unusual in the standard library to silently fix bad argument values.
There was a problem hiding this comment.
I like raising when too many workers are requested, and doing it quietly when it was "automatic".
|
Thanks @brianquinlan for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
|
Thanks, Brian! |
|
GH-13206 is a backport of this pull request to the 3.7 branch. |
|
Thanks @brianquinlan for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
|
GH-13643 is a backport of this pull request to the 3.7 branch. |
…GH-13132) (pythonGH-13643) Co-Authored-By: brianquinlan <brian@sweetapp.com> (cherry picked from commit 3988986) Co-authored-by: Brian Quinlan <brian@sweetapp.com>
This mirrors the upstream bugfix in python 3.8.0 which limits the size of the worker pool to 61: python/cpython#13132 Fixes: #13785
This mirrors the upstream bugfix in python 3.8.0 which limits the size of the worker pool to 61: python/cpython#13132 Fixes: #13785
This mirrors the upstream bugfix in python 3.8.0 which limits the size of the worker pool to 61: python/cpython#13132 Fixes: #13785
This mirrors the upstream bugfix in python 3.8.0 which limits the size of the worker pool to 61: python/cpython#13132 Fixes: #13785
https://bugs.python.org/issue26903