Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[21.02] python3-speedtest-cli: update to 2.1.3 #17390

Conversation

jamesmacwhite
Copy link
Contributor

Description:

Cherry pick 2.1.3 package bump from master due to a breaking change with the API.

python3-speedtest-cli version < 2.1.3 will not work currently and instead throw a Python error.

https://forum.openwrt.org/t/speedtest-cli-doesnt-work/114940/2
https://unix.stackexchange.com/questions/644442/speedtest-cli-valueerror-invalid-literal-for-int-with-base-10

This includes a fix for a breaking change in the Speedtest API.

Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
(cherry picked from commit 77ebd65)
@BKPepe
Copy link
Member

BKPepe commented Dec 19, 2021

Was it run and compile tested for OpenWrt 21.02?

cc maintainer: @jempatel

@jamesmacwhite
Copy link
Contributor Author

@BKPepe Thanks for taking a look. I haven't got a 21.02 environment to test on, but in theory the 2.1.2 to 2.1.3 change is purely down to the Ookla speedtest API and hence shouldn't have any major breaking change, however this will need confirming.

@BKPepe
Copy link
Member

BKPepe commented Dec 19, 2021

Thus this can not be accepted as it is. I am sorry!

We can not push this change to the stable branch unless it is tested on the real device, and because of that, I'm closing this pull request.

@BKPepe BKPepe closed this Dec 19, 2021
@jamesmacwhite
Copy link
Contributor Author

jamesmacwhite commented Dec 19, 2021

@BKPepe I understand, however the package version currently in the stable branch (2.1.2) is already broken and 2.1.3 has the fix with related to the API response. Granted, I can't verify that, but if the package maintainer can or someone else hopefully that will allow you to accept it.

@BKPepe
Copy link
Member

BKPepe commented Dec 21, 2021

I looked at it once again as a one-time courtesy for you. It is not good to send untested PRs to any repositories on GitHub/GitLab as it can go wrong if you want to have changes in the stable branch.

Before sending fixes here, you should be familiar with OpenWrt SDK, compiling packages, etc. Some hints can be found in OpenWrt documentation.

What I did:

Performed run testing on Turris Omnia, mvebu, cortexa9, OpenWrt 21.02.1

root@omnia:~# speedtest-cli
Retrieving speedtest.net configuration...
Traceback (most recent call last):
  File "/usr/bin/speedtest-cli", line 33, in <module>
    sys.exit(load_entry_point('speedtest-cli==2.1.2', 'console_scripts', 'speedtest-cli')())
  File "/usr/lib/python3.9/site-packages/speedtest.py", line 1986, in main
  File "/usr/lib/python3.9/site-packages/speedtest.py", line 1872, in shell
  File "/usr/lib/python3.9/site-packages/speedtest.py", line 1091, in __init__
  File "/usr/lib/python3.9/site-packages/speedtest.py", line 1173, in get_config
ValueError: invalid literal for int() with base 10: ''
  • But still the newer version, does not start even it does not show help. It always ends like this:
root@omnia:~# opkg install python3-speedtest-cli_2.1.3-3.9-1_arm_cortex-a9_vfpv3-d16.ipk 
Upgrading python3-speedtest-cli on root from 2.1.2-3.9-2 to 2.1.3-3.9-1...
Removing obsolete file /usr/lib/python3.9/site-packages/speedtest_cli-2.1.2-py3.9.egg-info/PKG-INFO.
Removing obsolete file /usr/lib/python3.9/site-packages/speedtest_cli-2.1.2-py3.9.egg-info/SOURCES.txt.
Removing obsolete file /usr/lib/python3.9/site-packages/speedtest_cli-2.1.2-py3.9.egg-info/top_level.txt.
Removing obsolete file /usr/lib/python3.9/site-packages/speedtest_cli-2.1.2-py3.9.egg-info/entry_points.txt.
Removing obsolete file /usr/lib/python3.9/site-packages/speedtest_cli-2.1.2-py3.9.egg-info/dependency_links.txt.
Configuring python3-speedtest-cli.
root@omnia:~# vim /usr/bin/speedtest-cli
root@omnia:~# speedtest-cli
Traceback (most recent call last):
  File "/usr/bin/speedtest-cli", line 33, in <module>
    sys.exit(load_entry_point('speedtest-cli==2.1.3', 'console_scripts', 'speedtest-cli')())
  File "/usr/bin/speedtest-cli", line 25, in importlib_load_entry_point
    return next(matches).load()
StopIteration

@jamesmacwhite
Copy link
Contributor Author

@BKPepe Fair point, it did seem like a minor version bump, but obviously there are further issues. My only hardware available is a WRT3200ACM which absolutely isn't going to be running 21.02, because of WiFI performance and general stability issues.

Maybe the original maintainer can take a look at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants