uv icon indicating copy to clipboard operation
uv copied to clipboard

Support `uv tool upgrade --python <PYTHON>`

Open j178 opened this issue 1 year ago • 3 comments

Closes #6297

j178 avatar Aug 22 '24 16:08 j178

We'll need to document this at https://docs.astral.sh/uv/concepts/tools/

Can you write some details here about the strategy for this?

I wonder if we should be upgrading Python versions by default during upgrade (unless the user requested a specific version during install).

zanieb avatar Aug 22 '24 17:08 zanieb

need to document this at https://docs.astral.sh/uv/concepts/tools/

sure, will do

upgrading Python versions by default during upgrade

I'm not very familiar with this codebase, could you provide some guidance? I wonder is there a chicken-egg problem, how do we decide which Python version to upgrade to?

j178 avatar Aug 23 '24 05:08 j178

For example, if there's a Python version that's newer than the one the tool is installed with, we reinstall the tool with the latest Python version we can find. We'd probably need to be careful to keep a tool on a managed or system Python e.g. do not switch from one to the other automatically. Does that make sense? One problem is we might not be able to solve in environment, in which case we'd have to bail on it? And we'd have to do this on every attempted upgrade? Eek. ~Definitely can be considered separately from this change.~ Actually, this might be important for this change because we might require uv tool install again if you want to change Python versions?

zanieb avatar Aug 23 '24 13:08 zanieb

I believe this was covered by #7605.

charliermarsh avatar Sep 26 '24 01:09 charliermarsh