gh-109649: Use os.process_cpu_count()#110165
Conversation
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.
|
Example: |
|
Replace os.cpu_count() with os.process_cpu_count() in programs:
multissltests.py and wasm_build.py use the code below to keep support for old Python versions: if hasattr(os, 'process_cpu_count'):
jobs = os.process_cpu_count()
else:
jobs = os.cpu_count() |
|
|
|
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.
Replace os.cpu_count() with os.process_cpu_count() in modules:
Replace os.cpu_count() with os.process_cpu_count() in programs:
Other changes:
📚 Documentation preview 📚: https://cpython-previews--110165.org.readthedocs.build/