mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:35:53 +01:00
[PR #2330] pool_workers: handle jobs=None without TypeError when MAX_PROCESS_WORKERS is set #2334
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2334
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2330
Author: @narekshaghoyandev
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:ubiq-pool-workers-none-jobs📝 Commits (1)
8507804pool_workers: handle jobs=None without TypeError when MAX_PROCESS_WORKERS is set📊 Changes
2 files changed (+12 additions, -0 deletions)
View changed files
📝
tests/test_pool_workers.py(+10 -0)📝
tools/pool_workers.py(+2 -0)📄 Description
Fixes a
TypeErrorintools/pool_workers.py:process_workers(jobs)whenjobs is NoneandMAX_PROCESS_WORKERSis set (Windows):ProcessPoolExecutor(max_workers=None)andmultiprocessing.Pool(None)acceptNoneto meanos.cpu_count(). Previously,process_workers(None)calledmin(None, 61)on Windows and raisedTypeError.jobs is None, returnNoneifMAX_PROCESS_WORKERS is None, otherwisemin(os.cpu_count() or 1, MAX_PROCESS_WORKERS).ProcessWorkersTest.test_none_jobs_respects_platform_limitintests/test_pool_workers.py.Verification
python3 -I -m py_compile tools/pool_workers.py tests/test_pool_workers.pypassedpython3 -I tests/test_pool_workers.py -vpassed (12 tests, 2 Windows-only skipped)TypeError(exit 1) against unmodifiedubiq/mainpython3 -I scripts/check_no_game_data.py tools/pool_workers.py tests/test_pool_workers.pycleanClaimed in the coordination issue as: TOOLS-POOL-WORKERS-NONE-JOBS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7193958665)
AI-assisted: yes (Gemini)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.