Re: Problem with tests for psutil-7.2.0

"Xi Ruoyao" ([email protected] via blfs-dev Mailing List) <[email protected]> Sun, 28 Dec 2025 13:41:59 +0800
Newsgroups gmane.linux.lfs.beyond.devel
Message-ID <[email protected]>
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.


-- 
Xi Ruoyao <[email protected]>

-- 
http://lists.linuxfromscratch.org/sympa/info/blfs-dev
Unsubscribe: See the above information page