Closed rapgro closed 2 years ago
I won't be working on this, but a conversion would be accepted (maybe clean up the code and make more general while we're at it)
Do you have some regression tests to let ensure we don't break anything with the refactoring?
Doesn't work on python3 :/
Romans-iMac:holms-ansible-osx holms$ sudo pip install speedometer
The directory '/Users/holms/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/holms/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting speedometer
Downloading Speedometer-2.8.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-build-348fs4tv/speedometer/setup.py", line 26, in <module>
import speedometer
File "/private/tmp/pip-build-348fs4tv/speedometer/speedometer.py", line 403
def get_data(self, (maxcol,maxrow)):
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-348fs4tv/speedometer/
Hi, I believe the necessary changes are available here: https://github.com/wardi/speedometer/pull/17
Version 2.8-3 is now available in Debian Testing with Python3 Support
On my Raspberry Pi Ubuntu Server 20.04.4 LTS I used speedometer (2.8-3)
with joy until I had to migrate from Ubuntu 20's default python3.8
to Deadsnake PPA's python3.9
.
Since then, starting speedmeter causes the following error:
$ speedometer -r eth0 -t eth0
Traceback (most recent call last):
File "/usr/bin/speedometer", line 24, in <module>
import psutil
File "/usr/lib/python3/dist-packages/psutil/__init__.py", line 95, in <module>
from . import _pslinux as _psplatform
File "/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 26, in <module>
from . import _psutil_linux as cext
ImportError: cannot import name '_psutil_linux' from partially initialized module 'psutil' (most likely due to a circular import) (/usr/lib/python3/dist-packages/psutil/__init__.py)
sudo apt install --reinstall python3-psutil
did not fix this error.
speedometer is the best realtime traffic monitor for me, so does anyone have an idea how I can make speedometer work again with python3.9
?
Fixed in master, close now, thank you!
https://docs.python.org/3/howto/pyporting.html https://docs.python.org/2/library/2to3.html