Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make psutil dependency optional #585

Closed
nicoddemus opened this issue Aug 17, 2020 · 1 comment · Fixed by #590
Closed

Make psutil dependency optional #585

nicoddemus opened this issue Aug 17, 2020 · 1 comment · Fixed by #590

Comments

@nicoddemus
Copy link
Member

As #583 shows, unfortunately psutil does not provide wheels for Linux (which is common), so in some systems pytest-xdist is harder to install than it should be.

I suggest we make psutil dependency optional, falling back to using multiprocessing to detect the number of CPUs if psutil is not installed.

ref: #560

manics added a commit to manics-archive/devspace that referenced this issue Aug 17, 2020
nicoddemus added a commit to nicoddemus/pytest-xdist that referenced this issue Aug 24, 2020
…hook

This reverts the behavior we had before psutil was a hard dependency, but
opens up the possibility of customization through the
pytest_xdist_auto_num_workers hook, making things like pytest-dev#477 possible.

Fix pytest-dev#585
nicoddemus added a commit to nicoddemus/pytest-xdist that referenced this issue Aug 25, 2020
This makes using psutil optional and opens up the possibility of customization
through the pytest_xdist_auto_num_workers hook, making things like pytest-dev#477 possible.

Fix pytest-dev#585
@nicoddemus
Copy link
Member Author

Released in 2.1.0. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant