Skip to content

Support uv tool upgrade --python <PYTHON>#6448

Closed
j178 wants to merge 2 commits intoastral-sh:mainfrom
j178:upgrade-python
Closed

Support uv tool upgrade --python <PYTHON>#6448
j178 wants to merge 2 commits intoastral-sh:mainfrom
j178:upgrade-python

Conversation

@j178
Copy link
Copy Markdown
Contributor

@j178 j178 commented Aug 22, 2024

Closes #6297

@zanieb
Copy link
Copy Markdown
Member

zanieb commented Aug 22, 2024

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 zanieb added the uv tool Related to the uv tool interface label Aug 22, 2024
@j178
Copy link
Copy Markdown
Contributor Author

j178 commented Aug 23, 2024

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?

@zanieb
Copy link
Copy Markdown
Member

zanieb commented Aug 23, 2024

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?

@charliermarsh
Copy link
Copy Markdown
Member

I believe this was covered by #7605.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

uv tool Related to the uv tool interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FR: Add support for uv tool upgrade --python <PYTHON>

3 participants