Repository navigation
fix: report Python-incompatible upgrades - #953
Conversation
|
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
tdstein
left a comment
There was a problem hiding this comment.
🤖 I ran the version check by hand on Python 3.8, 3.13, 3.15 and 3.16.0a1, using a wheel stamped 1.0.0, real deploy runs and an isolated HOME. Detection works in every case: the incompatible notice, upper bounds, prerelease interpreters, old-format caches, invalid specifiers, RSCONNECT_DISABLE_VERSION_CHECK, --quiet and non-deploy commands.
The suggested command is the one problem; details inline. Users who see this notice are, by definition, running a Python the latest release doesn't support, so a bare uv tool install rsconnect-python usually lands them on an older release.
| f"Upgrade with: pip install --upgrade rsconnect-python" | ||
| f"The latest version of rsconnect-python ({release.version}) requires Python " | ||
| f"{release.requires_python}, but you are running Python {python_version}.\n" | ||
| f'Install it with: uv tool install {force}--python "{release.requires_python}" rsconnect-python' |
There was a problem hiding this comment.
I know this is the direction we're going in so its fine, but this instruction being uv specific means that anyone who installed a different way gets a command for a tool they may not have (or they could end up with two installed versions in different locations right?). Again, probably fine, just calling it out here.
There was a problem hiding this comment.
anyone who installed a different way gets a command for a tool they may not have
It's entirely possible, but given how well uv tool fits into the problem space we are addressing here, I think its an ok tradeoff for the time being. If it turns out that access to uv ends up being a blocker, then we should investigate other solutions.
Summary
Cache the release's Python requirement and refresh legacy cache entries. The uv command selects a compatible Python and adds
--forcewhen the current installation has no uv receipt.Evidence
Merge Danger
Door: Two-way
Blast Radius: Deploy notices
Closes #945