> 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,
have you contacted upstream about this patch? do you have any references in the kernel code for this new path? or a reason why sometimes you added ADP0 as the first item in the list, and others as the last one? > 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, 2 days? you may want to reassess your expectations, demands, and approach to other volunteers in the project. > which I would > prefer not to do, as I've seen multiple cases were you prefer to do this > yourself. that still applies in this instance, so please do not NMU python-psutil. > > 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. No. > Also, the old repository doesn't redirect to the new place: you should > have asked Salsa admins to move the package for you. If this is something you're interested in, i dont see why you couldnt reach out to the Salsa admins to ask them just that.