-
Notifications
You must be signed in to change notification settings - Fork 973
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
[feat] uv python upgrade
or uv python install --upgrade
#7892
Comments
This gonna be pretty tricky, as managed Python installations are tied to specific locations based on installation key, which include the full version information. Not only the installed tools, but all venvs created using that Python installation, all of which would need to be recreated as well. I'm thinking to introduce an intermediary layer between the user and the specific Python installation, called Proposed operations:
Implementation details:
|
Completely forgot about this. You are totally right, this is going to be a total PITA to implement 😱 I think that if a user deliberately invokes the command should be aware of the consequences (for venvs at least; perhaps not for tools) and might be informed via a message. But I also see reasons against doing this :) I guess that, as a starter, it could be handy if |
@baggiponte if you use |
I guess, problem solved: uv python install --reinstall 3.{9,10,11,12}
Searching for Python versions matching: Python 3.10
Found existing installation for Python 3.10: cpython-3.10.14-macos-aarch64-none
Searching for Python versions matching: Python 3.11
Found existing installation for Python 3.11: cpython-3.11.9-macos-aarch64-none
Searching for Python versions matching: Python 3.12
Found existing installation for Python 3.12: cpython-3.12.5-macos-aarch64-none
Searching for Python versions matching: Python 3.9
Found existing installation for Python 3.9: cpython-3.9.19-macos-aarch64-none
Installed 4 versions in 11.25s
- cpython-3.9.19-macos-aarch64-none
+ cpython-3.9.20-macos-aarch64-none
- cpython-3.10.14-macos-aarch64-none
+ cpython-3.10.15-macos-aarch64-none
- cpython-3.11.9-macos-aarch64-none
+ cpython-3.11.10-macos-aarch64-none
- cpython-3.12.5-macos-aarch64-none
+ cpython-3.12.6-macos-aarch64-none I'm kinda happy with this. If you think it makes sense, I'd be willing to document this behaviour in the docs 😊 EDIT: of course, after this I ran
I tried |
Clearly we would want one single command that could upgrade all pythons that will be idempotent (not do anything if newer versions are not found). |
Ciao! New python versions are coming out and I wonder if uv can behave a bit more like
mise
or other devtools in that it can upgrade the python versions. For example, @hynek teased a video about how he usesMOPup
to keep his Python versions updatedand it would be fun to ruin his plans once again.Jokes aside, I think it might be useful to either have a way to see if local python versions are outdated (
uv python list --outdated
?) and possibly auv python install --upgrade
. For example, I thinkuv python install --upgrade 3.12
automatically downloads the 3.12 release from yesterday (3.12.7 was released) and, if I have an older one, removes that (since the user is explicitly asking for an update).Currently,
uv python install 3.12
does not download anything if there is a 3.12 version already installed on the machine.This can be a bit of a pain to implement in that it requires all tools installed with a specific python version to a. be reinstalled or b. be modified to point to the new python path.
I searched the issue tab but could not find a similar issue. Feel free to close.
The text was updated successfully, but these errors were encountered: