Remove latest version warning
I suspect the latest version warning has caused more pain than usefulness, for a couple of reasons.
- It's caused issues with flags like
--outputjsonwhich have since been fixed but it's a bit of a whack-a-mole situation and I wouldn't be surprised if other issues crop up in the future. - It makes the CLI slower, ~200ms on my machine which isn't too bad but it would be much slower if the user is on a slow network
Obviously with features like this one it's very hard, if not impossible, to actually judge how many people this has positively impacted. As such, I'm proposing removing the latest version warning log and if there is an uptick in pyright issues reported by users on an old version, we can consider adding it back in.
cc @erictraut do you have any opinions here?
I don't have a strong opinion here, but I worry a bit that removing this check will make it more likely that developers will have stale copies of pyright installed and not realize it.
One option to consider... you could keep the check in place but throttle it so it isn't performed on every invocation. For example, you could throttle it to once a week. That would require you to persist information about the time the last check was performed.
Obviously with features like this one it's very hard, if not impossible, to actually judge how many people this has positively impacted. As such, I'm proposing removing the latest version warning log and if there is an uptick in pyright issues reported by users on an old version, we can consider adding it back in.
This is an important concern. While it's best to leave upgrades to the package manager (brew, etc), preventing spurious issues that drag down development it also important. However, this can be mitigated by adding an issue template that reminds people of the current version and that bugs filed against previous versions will not be treated with the same priority.
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository
I found my way here after debugging why pyright --help executed in a loop sometimes randomly takes 15 seconds, and stracing it to a DNS resolve.
This... is surprising to the least. Plus now I have spammed pypi probably a lot in a loop.