Support `uv tool upgrade --python <PYTHON>`
Closes #6297
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).
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?
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?
I believe this was covered by #7605.