Problem
Users can end up running very outdated versions of rsconnect-python without realizing it. When the CLI hits removed API endpoints on newer versions of Connect, the error messages are confusing (e.g., 404 Not Found on /__api__/applications/{id}/upload) and don't hint that upgrading the tool would fix the problem.
Proposal
Add a version check that runs on CLI invocation (or at least on deploy commands) and prints a notice if a newer version is available on PyPI. Something like:
WARNING: You are using rsconnect version 0.1.3; however, version 1.29.0 is available.
You should consider upgrading via the 'pip install --upgrade rsconnect' command.
This is similar to how pip itself warns about outdated versions, and how conda shows "A newer version of conda exists."
Considerations
- The check should be non-blocking and fail silently (don't break deploys if PyPI is unreachable)
- Could cache the check result for some period (e.g., 24 hours) to avoid slowing down every invocation
- Could be disableable via a flag or environment variable (e.g.,
RSCONNECT_NO_UPDATE_CHECK=1)
- Should only print to stderr so it doesn't interfere with scripted/CI usage
Problem
Users can end up running very outdated versions of
rsconnect-pythonwithout realizing it. When the CLI hits removed API endpoints on newer versions of Connect, the error messages are confusing (e.g.,404 Not Foundon/__api__/applications/{id}/upload) and don't hint that upgrading the tool would fix the problem.Proposal
Add a version check that runs on CLI invocation (or at least on
deploycommands) and prints a notice if a newer version is available on PyPI. Something like:This is similar to how
pipitself warns about outdated versions, and howcondashows "A newer version of conda exists."Considerations
RSCONNECT_NO_UPDATE_CHECK=1)