miurahr / aqtinstall

aqt: Another (unofficial) Qt CLI Installer on multi-platforms
https://aqtinstall.readthedocs.io/en/latest/
MIT License
915 stars 84 forks source link

Don't suggest that users file a bug report unless they are using the newest version #676

Open ddalcino opened 1 year ago

ddalcino commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, aqtinstall requests that users file a bug report any time that it raises an exception that it cannot recover from. Quite frequently, we get bug reports for bugs that we have already fixed. It would be nice if aqtinstall would only display the PLEASE FILE A BUG REPORT message when the user is using the most recent version of aqtinstall.

Describe the solution you'd like When an exception is raised that aqtinstall does not know how to handle, aqtinstall should first check with PyPI to find out if there's a newer version available. If there is, aqtinstall should print PLEASE USE THE NEWEST AQTINSTALL instead. It should only request that users file a bug report if aqtinstall is already on the newest version.

Describe alternatives you've considered Add an empty checkbox to the "Bug Report" issue template that asks users if they are using the newest version of aqtinstall. Use a bot to automatically close any bug reports where the user has not checked the box.

Additional context None

ddalcino commented 1 year ago

You can fetch a list of releases via JSON api here: https://pypi.org/pypi/aqtinstall/json

pzhlkj6612 commented 1 year ago

People in certain parts of the world may not have easy access to PyPI.

Here are two result pages of the PING test to "pypi.org":

DateTime Screenshot on Archive Today URL to Archive Today
6 May 2023 17:07:39 UTC https://archive.today/1ywgd
14 May 2023 04:51:49 UTC https://archive.today/9L03A

On the webpage (open the URL, not the screenshot), you can find the word "美国", the USA, has the "<1ms" latency. It's good, I think.

Thanks, GFW (Great Firewall - Wikipedia).

ddalcino commented 1 year ago

Good point. There are also these two JSON apis that might work:

We could make a "best effort" attempt: check either pypi or github and use the other as a fallback. If both attempts fail, maybe it makes sense to print the "File a bug report" message anyway?

pzhlkj6612 commented 1 year ago

We could make a "best effort" attempt: check either pypi or github and use the other as a fallback. If both attempts fail, maybe it makes sense to print the "File a bug report" message anyway?

Agree.


The procedure could be as follows: