It looks like to me that the bug is because, with newer kernels, the
correct path for the power supply plug should be: /sys/class/power_supply/ADP0
At least, the above is what I have currently have in my laptop.
The current code for psutil is expecting /AC0 or /AC, but not /ADP0. If
I'm correct that this is just a new possible path, then the solution is
to simply add this new path as possible path in sensors_battery().
Though adding /ADP0 as possible path in psutil/_pslinux.py's sensors_battery() breaks a bunch of tests, so the attached patch also
fixes them.
Please do apply the patch and upload the package ASAP,
as we're close to
the freeze, and a few packages I know need psutil >= 6. We really want python-psutil 7.0.0 to migrate to Testing soon. Knowing this, if nothing
is done, I'll be NMU-ing the attached fix in 2 days,
which I would
prefer not to do, as I've seen multiple cases were you prefer to do this yourself.
Last thing, when having my VPN on, I'm getting this error (with my
10.x.x.x IP annonymized):
________________________ TestSystemNetIfAddrs.test_ips _________________________
self = <psutil.tests.test_linux.TestSystemNetIfAddrs testMethod=test_ips>
def test_ips(self):
for name, addrs in psutil.net_if_addrs().items():
for addr in addrs:
if addr.family == psutil.AF_LINK:
assert addr.address == get_mac_address(name)
elif addr.family == socket.AF_INET:
assert addr.address == get_ipv4_address(name)
assert addr.netmask == get_ipv4_netmask(name)
if addr.broadcast is not None:
assert addr.broadcast == get_ipv4_broadcast(name)
else:
assert get_ipv4_broadcast(name) == '0.0.0.0'E AssertionError: assert '10.x.x.255' == '0.0.0.0'
E
E - 0.0.0.0
E + 10.x.x.255
psutil/tests/test_linux.py:957: AssertionError
=========================== short test summary info ============================
FAILED psutil/tests/test_linux.py::TestSystemNetIfAddrs::test_ips - Assertion...
So I would suggest disabling this test, as it doesn't feel like a
reliable test.
Hoping this patch is helpful, and that you can fix #1101865 quickly,
Cheers,
Thomas Goirand (zigo)
P.S: IMO, strong package ownership for python-psutil is wrong,
considering it has 136 reverse dependencies, and this package would be
better back in the Python team. Please consider pushing it back there.
Also, the old repository doesn't redirect to the new place: you should
have asked Salsa admins to move the package for you.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 15:24:22 |
Calls: | 10,389 |
Files: | 14,061 |
Messages: | 6,416,911 |