psutil
is no longer a dependency, as it has proven to make pytest-xdist
installation in certain platforms and containers problematic.
To those interested to continue to use psutil
to detect the number of CPUs, the new pytest_xdist_auto_num_cpus
hook can be used in the root conftest.py
file of the project:
def pytest_xdist_auto_num_workers(config):
import psutil
return psutil.cpu_count(logical=False)