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

Dim uninstalled Python keys in uv python list #9841

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Dec 12, 2024

Attempted to improve the experience in #9830 by dimming the key as well as the <download available> bit

Screenshot 2024-12-12 at 9 25 18 AM

@zanieb zanieb added the cli Related to the command line interface label Dec 12, 2024
@zanieb
Copy link
Member Author

zanieb commented Dec 12, 2024

Perhaps if we dim these we should sort them after the installed versions?

@hwine
Copy link

hwine commented Dec 12, 2024

I like styling both columns in each line the same -- that strengthens the relationship.

I think I like sorting available-but-not-yet-installed to the bottom, but that will be a "visually breaking change".

This discussion is helping me focus on what my main root issue is with uv installations. uv divides the python-sources into two worlds (managed & system), but "system", to me (and I think a lot of prior python install discussions), means "installed & managed by the OS". (This was certainly true during the python 2 to 3 migration era.)

So, where does that leave the user installed versions, such as those handled by pyenv or manual installs from python.org?

Which is a long winded way of saying that, on reflection, I think the "does uv consider this installed python managed or system" question is more important than "is this installed yet". Knowing that distinction is a requirement to choosing the correct --python-preference option for my current use case. (I'm unaware of any other command that shows that information. afaik, you have to guess, then confirm, by setting an option to uv python list)

Even more succinct, I would prefer addressing the (just opened) #9847 to this issue. (Sorry for the churn, but thanks for helping me think this through.)

@shauneccles
Copy link

I wonder if the list has n table groups, where n is types of install status?

PS D:\Programming\LedFx> uv python list
System Installed  
cpython-3.12.1-windows-x86_64-none                 C:\Users\shaun\AppData\Local\Programs\Python\Python312\python.exe
uv Installed
cpython-3.10.15-windows-x86_64-none                C:\Users\shaun\AppData\Roaming\uv\python\cpython-3.10.15-windows-x86_64-none\python.exe
cpython-3.9.20-windows-x86_64-none                 C:\Users\shaun\AppData\Roaming\uv\python\cpython-3.9.20-windows-x86_64-none\python.exe
uv Available
cpython-3.13.1+freethreaded-windows-x86_64-none    <download available>
cpython-3.13.1-windows-x86_64-none                 <download available>
cpython-3.12.8-windows-x86_64-none                 <download available>
cpython-3.11.11-windows-x86_64-none                <download available>
cpython-3.10.16-windows-x86_64-none                <download available>
cpython-3.9.21-windows-x86_64-none                 <download available>
cpython-3.8.20-windows-x86_64-none                 <download available>
cpython-3.7.9-windows-x86_64-none                  <download available>
pypy-3.10.14-windows-x86_64-none                   <download available>
pypy-3.9.19-windows-x86_64-none                    <download available>
pypy-3.8.16-windows-x86_64-none                    <download available>
pypy-3.7.13-windows-x86_64-none                    <download available>
uv Unavailable
some-random-version-that-isn't-available

@zanieb
Copy link
Member Author

zanieb commented Dec 12, 2024

We've been intentionally avoiding tables here, they're harder to parse and I don't think the complexity is merited. It's tough to definitely tough the information density / simplicity right though.

@BurntSushi
Copy link
Member

I like keeping them sorted as-is. I think it's easy to be disoriented if there are two different groups, each sorted, in the output.

I don't mind using color to dim things that are uninstalled. From the screenshot, I wonder if the color here is a little too dim. But I like the idea.

@konstin
Copy link
Member

konstin commented Dec 18, 2024

I like separate "installed" and "download available" sections, this would make it easier to skim what is actually installed and what's only in the list.

We could also reduce some duplication, e.g. those are all one python interpreter on my machine:

cpython-3.12.3-linux-x86_64-gnu                 .local/bin/python3.12 -> .pyenv/versions/3.12.3/bin/python
cpython-3.12.3-linux-x86_64-gnu                 .local/bin/python3 -> python3.12
cpython-3.12.3-linux-x86_64-gnu                 .local/bin/python -> python3.12

For reference, that's what my list currently looks like:

image

@zanieb
Copy link
Member Author

zanieb commented Dec 18, 2024

separate "installed" and "download available" sections, this would make it easier to skim what is actually installed and what's only in the list.

This is intentional though, like, you can use those versions automatically even if they're not explicitly installed yet. That's why they're listed in the first place. There's --only-installed if you don't want to see them.

We could also reduce some duplication, e.g. those are all one python interpreter on my machine ..

This is also intentional, so you can see what each executable on your path refers to. If we collapsed these, you'd lose that python and python3 are aliases for python3.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants