python 3.13 doesn't include telnetlib
Describe the bug python3.13 removes the telnetlib module, which is used in in hddtemp.
Your py3status version py3status version 3.59 (python 3.12.6) on i3
To Reproduce Run py3status with python3.13 against and hddtemp-enabled config:
2024-10-09 14:08:59 INFO Module `hddtemp` could not be loaded (No module named 'telnetlib')
Expected behavior Success with python3.13, using something else than telnetlib.
Additional context This is Debian bug https://bugs.debian.org/1084713: as the next Debian stable will be released with python 3.13, the presence of py3status is conditioned to a fix for this issue.
Interesting catch.
Since version 3.12 it reminds that telnetlib is deprecated.
For me, using real telnet lib is real overkill.
One solution is just use
line = self.py3.command_output("nc localhost 7634")
Instead of line:
https://github.com/ultrabug/py3status/blob/49d51e3071b2ea5b15aadf0ba193da12666fc4a4/py3status/modules/hddtemp.py#L138
I'm totally fine with that fix, I guess you'll just need to document the additional dependency on nc, and I'll also have to include it as a Debian Depends:.
Make a PR.
Ah sorry I won't have time to do that: my volunteer time is pretty much all used up on the Debian side. This bug report was only meant to properly report that the current version of py3status, which uses telnetlib, won't be able to get included in the next Debian stable release.
No problem. Thank you. One of us will be on it.
BTW, as much as I hate to hijack an existing ticket to discuss other issues, I figure it may be worth it if it can avoid creating tickets you deem unnecessary:
-
I have an existing bug report on the Debian side caused by
/usr/lib/python3/dist-packages/py3status/modules/bluetooth.py:103: SyntaxWarning: invalid escape sequence '\?', with python 3.12 at least. It's absolutely not critical, and doesn't impact py3status' presence in Debian at all, but would you still like a proper issue about it? -
another early warning highlights that
pkg_resourcesis deprecated in favor ofimportlib-based solutions (see https://setuptools.pypa.io/en/latest/pkg_resources.html); this one also has zero impact at this point, but if you want an issue about it I can open one.
Wouldn't the combo of kernel module drivetemp and py3status lm_sensors module work, rather than depending on the orphaned/unmaintained [1] hddtemp?
[1] https://savannah.nongnu.org/projects/hddtemp/
Possibly. If that works, then you can use that. Package lm_sensors could be orphaned/unmaintained too. If hddtemp still work, then we don't have to deprecate it today.
The issue at hand here isn't hddtemp being orphaned/unmaintained, but the fact that Python deprecated telnetlib in version 3.13 and will break this module. hddtemp itself isn't broken.
Easy fix is to going with a telnet command instead of telnetlib so we can still use this in practically any Python version. 100% salvageable.
@sdelafond Please fIle those new issues. 👍