Re: Problem with tests for psutil-7.2.0
"Bruce Dubbs" ([email protected] via blfs-dev Mailing List) <[email protected]> Sun, 28 Dec 2025 10:37:35 -0600
| Newsgroups | gmane.linux.lfs.beyond.devel |
|---|---|
| Message-ID | <[email protected]> |
On 12/27/25 11:41 PM, Xi Ruoyao ([email protected] via blfs-dev Mailing List) wrote: > On Sat, 2025-12-27 at 14:51 -0600, Bruce Dubbs wrote: >> I'm trying to update the book to psutil-7.2.0. Building the wheel and installing is >> fine with current instructions. >> >> $ pip3 list|grep psutil >> psutil 7.2.0 >> >> The problem I have is running the tests: >> >> python3 -m venv --system-site-packages testenv && >> testenv/bin/pip3 install colorama pytest-{instafail,subtests,xdist} \ >> psleak pyperf pypinfo && >> PSUTIL_DEBUG=1 testenv/bin/python3 -m pytest >> >> In the last line I get: >> >> ERROR tests/test_aix.py >> ERROR tests/test_bsd.py >> ERROR tests/test_connections.py >> ERROR tests/test_contracts.py >> ERROR tests/test_heap.py >> ERROR tests/test_linux.py >> ERROR tests/test_memleaks.py >> ERROR tests/test_misc.py >> ERROR tests/test_osx.py >> ERROR tests/test_posix.py >> ERROR tests/test_process.py >> ERROR tests/test_process_all.py >> ERROR tests/test_scripts.py >> ERROR tests/test_sudo.py >> ERROR tests/test_sunos.py >> ERROR tests/test_system.py >> ERROR tests/test_testutils.py >> ERROR tests/test_unicode.py >> ERROR tests/test_windows.py >> !!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 19 errors during collection >> >> Looking at the output, all the tests have: >> >> E ImportError: cannot import name '_psutil_linux' from 'psutil' (consider renaming >> '/build/psutil/psutil-7.2.0/psutil/__init__.py' if it has the same name as a library >> you intended to import) > > It looks like you've forgotten > > cp build/lib*/psutil/*.so psutil > > in the book. The suggestion to rename it seems just misleading. > > This test suite is really annoying. I guess we'd better just mark it > broken. You are right Xi. I missed that cp command. I now get 3 failures: TestSystemAPIs::test_disk_usage (already documented) TestFetchAllProcesses::test_all TestNetAPIs::test_net_if_addrs 3 failed, 524 passed, 171 skipped, 2 warnings in 6.82s I'll just document those last two failures. I agree that the tests are annoying, but I don't think it's unreasonable to leave them in the book. -- Bruce -- http://lists.linuxfromscratch.org/sympa/info/blfs-dev Unsubscribe: See the above information page