Add document for specifying Python interpreter in tool installation and upgrade commands.#11598
Conversation
…nd upgrade commands. Signed-off-by: FishAlchemist <[email protected]>
docs/guides/tools.md
Outdated
| You can specify the Python interpreter to use with the `--python` option: | ||
|
|
||
| ```console | ||
| $ uv tool install ruff --python=3.10 | ||
| ``` |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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/ .
There was a problem hiding this comment.
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:
....
There was a problem hiding this comment.
(and yeah linking to the Python versions concept page seems correct)
…ion. Signed-off-by: FishAlchemist <[email protected]> Signed-off-by: FishAlchemist <[email protected]>
d4515dd to
bb5ab6d
Compare
Signed-off-by: FishAlchemist <[email protected]>
Signed-off-by: FishAlchemist <[email protected]>
zanieb
left a comment
There was a problem hiding this comment.
Thank you! I made some small changes.
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.6.0` -> `0.6.3` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>astral-sh/uv (astral-sh/uv)</summary> ### [`v0.6.3`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#063) [Compare Source](astral-sh/uv@0.6.2...0.6.3) ##### Enhancements - Allow quotes around command-line options in `requirement.txt files` ([#​11644](astral-sh/uv#11644)) - Initialize PEP 723 script in `uv lock --script` ([#​11717](astral-sh/uv#11717)) ##### Configuration - Accept multiple `.env` files in `UV_ENV_FILE` ([#​11665](astral-sh/uv#11665)) ##### Performance - Reduce overhead in converting resolutions ([#​11660](astral-sh/uv#11660)) - Use `SmallString` on `Hashes` ([#​11756](astral-sh/uv#11756)) - Use a `Box` for `Yanked` on `File` ([#​11755](astral-sh/uv#11755)) - Use a `SmallString` for the `Yanked` enum ([#​11715](astral-sh/uv#11715)) - Use boxed slices for hash vector ([#​11714](astral-sh/uv#11714)) - Use install concurrency for bytecode compilation too ([#​11615](astral-sh/uv#11615)) ##### Bug fixes - Avoid installing duplicate dependencies across conflicting groups ([#​11653](astral-sh/uv#11653)) - Check subdirectory existence after cache heal ([#​11719](astral-sh/uv#11719)) - Include uppercase platforms for Windows wheels ([#​11681](astral-sh/uv#11681)) - Respect existing PEP 723 script settings in `uv add` ([#​11716](astral-sh/uv#11716)) - Reuse refined interpreter to create tool environment ([#​11680](astral-sh/uv#11680)) - Skip removed directories during bytecode compilation ([#​11633](astral-sh/uv#11633)) - Support conflict markers in `uv export` ([#​11643](astral-sh/uv#11643)) - Treat lockfile as outdated if (empty) extras are added ([#​11702](astral-sh/uv#11702)) - Display path separators as backslashes on Windows ([#​11667](astral-sh/uv#11667)) - Display the built file name instead of the canonicalized name in `uv build` ([#​11593](astral-sh/uv#11593)) - Fix message when there are no buildable packages ([#​11722](astral-sh/uv#11722)) - Re-allow HTTP schemes for Git dependencies ([#​11687](astral-sh/uv#11687)) ##### Documentation - Add anchor links to arguments and options in the CLI reference ([#​11754](astral-sh/uv#11754)) - Add link to environment marker specification ([#​11748](astral-sh/uv#11748)) - Fix missing a closing bracket in the `cache-keys` setting ([#​11669](astral-sh/uv#11669)) - Remove the last edited date from documentation pages ([#​11753](astral-sh/uv#11753)) - Fix readme typo ([#​11742](astral-sh/uv#11742)) ### [`v0.6.2`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#062) [Compare Source](astral-sh/uv@0.6.1...0.6.2) ##### Enhancements - Add support for constraining build dependencies with `tool.uv.build-constraint-dependencies` ([#​11585](astral-sh/uv#11585)) - Sort dependency group keys when adding new group ([#​11591](astral-sh/uv#11591)) ##### Performance - Use an `Arc` for index URLs ([#​11586](astral-sh/uv#11586)) ##### Bug fixes - Allow use of x86-64 Python on ARM Windows ([#​11625](astral-sh/uv#11625)) - Fix an issue where conflict markers could instigate a very large lock file ([#​11293](astral-sh/uv#11293)) - Fix duplicate packages with multiple conflicting extras declared ([#​11513](astral-sh/uv#11513)) - Respect color settings for log messages ([#​11604](astral-sh/uv#11604)) - Eagerly reject unsupported Git schemes ([#​11514](astral-sh/uv#11514)) ##### Documentation - Add documentation for specifying Python versions in tool commands ([#​11598](astral-sh/uv#11598)) ### [`v0.6.1`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#061) [Compare Source](astral-sh/uv@0.6.0...0.6.1) ##### Enhancements - Allow users to mark platforms as "required" for wheel coverage ([#​10067](astral-sh/uv#10067)) - Warn for builds in non-build and workspace root pyproject.toml ([#​11394](astral-sh/uv#11394)) ##### Bug fixes - Add `--all` to `uvx --reinstall` message ([#​11535](astral-sh/uv#11535)) - Fallback to `GET` on HTTP 400 when attempting to use range requests for wheel download ([#​11539](astral-sh/uv#11539)) - Prefer local variants in preference selection ([#​11546](astral-sh/uv#11546)) - Respect verbatim executable name in `uvx` ([#​11524](astral-sh/uv#11524)) ##### Documentation - Add documentation for required environments ([#​11542](astral-sh/uv#11542)) - Note that `main.py` used to be `hello.py` ([#​11519](astral-sh/uv#11519)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzEuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3OS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
…and upgrade commands. (astral-sh#11598) <!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## 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 astral-sh#11536 ## Test Plan Run doc server with strict mode in local. (``mkdocs serve -f mkdocs.public.yml --strict``)  <!-- How was it tested? --> --------- Signed-off-by: FishAlchemist <[email protected]> Co-authored-by: Zanie Blue <[email protected]>

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)