]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-109649: Use os.process_cpu_count() (#110165)
authorVictor Stinner <vstinner@python.org>
Sun, 1 Oct 2023 01:14:57 +0000 (03:14 +0200)
committerGitHub <noreply@github.com>
Sun, 1 Oct 2023 01:14:57 +0000 (03:14 +0200)
commita46e96076898d126c9f276aef1934195aac34b4e
treebeaec25a75f381f77b74bf4e164eb813c20ec81f
parent53eb9a676f8c59b206dfc536b7590f6563ad65e0
gh-109649: Use os.process_cpu_count() (#110165)

Replace os.cpu_count() with os.process_cpu_count() in modules:

* compileall
* concurrent.futures
* multiprocessing

Replace os.cpu_count() with os.process_cpu_count() in programs:

* _decimal deccheck.py test
* freeze.py
* multissltests.py
* python -m test (regrtest)
* wasm_build.py

Other changes:

* test.pythoninfo logs os.process_cpu_count().
* regrtest gets os.process_cpu_count() / os.cpu_count() in headers.
16 files changed:
Doc/library/compileall.rst
Doc/library/concurrent.futures.rst
Doc/library/multiprocessing.rst
Doc/whatsnew/3.13.rst
Lib/concurrent/futures/process.py
Lib/concurrent/futures/thread.py
Lib/multiprocessing/pool.py
Lib/test/libregrtest/main.py
Lib/test/libregrtest/utils.py
Lib/test/pythoninfo.py
Lib/test/test_concurrent_futures/test_thread_pool.py
Misc/NEWS.d/next/Library/2023-10-01-01-47-21.gh-issue-109649.BizOaD.rst [new file with mode: 0644]
Modules/_decimal/tests/deccheck.py
Tools/freeze/test/freeze.py
Tools/ssl/multissltests.py
Tools/wasm/wasm_build.py