Skip to content
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

Add document for specifying Python interpreter in tool installation and upgrade commands. #11598

Merged
merged 5 commits into from
Feb 18, 2025

Conversation

FishAlchemist
Copy link
Contributor

@FishAlchemist FishAlchemist commented Feb 18, 2025

Summary

Just to add the section for installing and upgrading uv tool, specifying the Python version, in the document.
Originally, it was planned to add a markdown block (header) for representation, but it was felt to be a bit redundant, so it ended up being like this.

close #11536

Test Plan

Run doc server with strict mode in local. (mkdocs serve -f mkdocs.public.yml --strict)
image

…nd upgrade commands.

Signed-off-by: FishAlchemist <48265002+FishAlchemist@users.noreply.github.com>
Comment on lines 169 to 173
You can specify the Python interpreter to use with the `--python` option:

```console
$ uv tool install ruff --python=3.10
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move these into a dedicated section instead? We're explaining what tool installations are here — it seems distracting to jump to this.

In the guide, I'd put a ## Requesting Python versions section after installing or upgrading tools?

I think there should also be a ## Python versions section in the tool concept page?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move these into a dedicated section instead? We're explaining what tool installations are here — it seems distracting to jump to this.
In the guide, I'd put a ## Requesting Python versions section after installing or upgrading tools?

Yes, but should I put two commands (install and upgrade), or just put the install command?

I think there should also be a ## Python versions section in the tool concept page?

Yes, it can be added, but perhaps it's only necessary to mention the minor differences and then point to https://docs.astral.sh/uv/concepts/python-versions/ .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be reasonable to be like..

To request a specific Python version for the tool installation:

...

To change the Python version of an existing tool during upgrade:

....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(and yeah linking to the Python versions concept page seems correct)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
Regarding the concept, to avoid misunderstanding it, I will refrain from modifying it for now. However, I have linked the guides to it.

…ion.

Signed-off-by: FishAlchemist <48265002+FishAlchemist@users.noreply.github.com>

Signed-off-by: FishAlchemist <48265002+FishAlchemist@users.noreply.github.com>
FishAlchemist and others added 3 commits February 19, 2025 00:06
Signed-off-by: FishAlchemist <48265002+FishAlchemist@users.noreply.github.com>
Signed-off-by: FishAlchemist <48265002+FishAlchemist@users.noreply.github.com>
Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I made some small changes.

@zanieb zanieb merged commit 555bf89 into astral-sh:main Feb 18, 2025
61 checks passed
@zanieb zanieb added the documentation Improvements or additions to documentation label Feb 18, 2025
@FishAlchemist FishAlchemist deleted the tool_specifying_python branch February 18, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add documentation for Python version requests in uv tool install
2 participants