Add --show-version to uv python find (#12376)

@jtfmumm mentioned a desire for this. I'm not sure how we should do
this. I kind of want to change this to something like...

```
$ uv python find
CPython 3.13 @ <path>
$ uv python find --only-path
<path>
$ uv python find --short
<path>
$ uv python find --only-version 
3.13
```

The change in defaults would be breaking though.
This commit is contained in:
Zanie Blue 2025-04-03 08:34:45 -05:00 committed by GitHub
parent a6c621d4a5
commit be3d5dfa84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 90 additions and 21 deletions

View file

@ -5096,6 +5096,8 @@ uv python find [OPTIONS] [REQUEST]
</dd><dt id="uv-python-find--script"><a href="#uv-python-find--script"><code>--script</code></a> <i>script</i></dt><dd><p>Find the environment for a Python script, rather than the current project</p>
</dd><dt id="uv-python-find--show-version"><a href="#uv-python-find--show-version"><code>--show-version</code></a></dt><dd><p>Show the Python version that would be used instead of the path to the interpreter</p>
</dd><dt id="uv-python-find--system"><a href="#uv-python-find--system"><code>--system</code></a></dt><dd><p>Only find system Python interpreters.</p>
<p>By default, uv will report the first Python interpreter it would use, including those in an active virtual environment or a virtual environment in the current working directory or any parent directory.</p>