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

Handle verbose output for uv pip list --verbose #9838

Open
julienp opened this issue Dec 12, 2024 · 2 comments · May be fixed by #9839
Open

Handle verbose output for uv pip list --verbose #9838

julienp opened this issue Dec 12, 2024 · 2 comments · May be fixed by #9839
Labels
compatibility Compatibility with a specification or another tool

Comments

@julienp
Copy link

julienp commented Dec 12, 2024

Currently uv pip list does not handle the -v/--verbose flag.

This option makes pip list print the location for each package, as well as the installer.
Location is the location where the package is installed, usually site-packages. Installer is read from ${PACKAGE}-${VERSION}.dist-info/INSTALLER.

https://github.com/pypa/pip/blob/947917be5d8d826efde3f0ad398ec6128cf5bfe8/src/pip/_internal/commands/list.py#L348

% uv run pip list -v
Package       Version Location                                                     Installer
------------- ------- ------------------------------------------------------------ ---------
Arpeggio      2.0.2   /Users/julien/tmp/uv-demo/.venv/lib/python3.13/site-packages uv
attrs         24.2.0  /Users/julien/tmp/uv-demo/.venv/lib/python3.13/site-packages uv
debugpy       1.8.8   /Users/julien/tmp/uv-demo/.venv/lib/python3.13/site-packages uv
...

When running uv pip list -v, instead the -v option prints verbose logs for uv instead of using the verbose list format:

uv pip list -v
DEBUG uv 0.5.8 (Homebrew 2024-12-11)
DEBUG Searching for default Python interpreter in virtual environments or search path
DEBUG Found `cpython-3.13.0-macos-aarch64-none` at `/Users/julien/tmp/uv-demo/.venv/bin/python3` (virtual environment)
DEBUG Using Python 3.13.0 environment at: .venv
Package       Version
------------- -------
arpeggio      2.0.2
attrs         24.2.0
debugpy       1.8.8
julienp added a commit to julienp/uv that referenced this issue Dec 12, 2024
Handle the `-v/—verbose` flag for `pip list`.

Fixes astral-sh#9838
@julienp julienp linked a pull request Dec 12, 2024 that will close this issue
@charliermarsh charliermarsh added the compatibility Compatibility with a specification or another tool label Dec 12, 2024
@charliermarsh
Copy link
Member

I find that to be a slightly strange behavior but not opposed for compatibility.

@julienp
Copy link
Author

julienp commented Dec 12, 2024

I find that to be a slightly strange behavior but not opposed for compatibility.

I agree that it is a little weird, I wish pip had a flag specific to pip list to include more information instead of using the global -v.

My actual use case is getting a list of installed packages and their installation path, so that I can go look for a special file inside the packages. This is to handle some special behaviour in http://github.com/pulumi/pulumi.

Does uv provide another way to retrieve this? There's uv tree, but that does not provide machine readable output (nor the location information).

julienp added a commit to pulumi/pulumi that referenced this issue Dec 23, 2024
Use `pip` instead of `uv pip` to read the package list when determing pulumi plugins.  `uv pip` does not support the `-v` flag, which is required to retrive the package location with `pip`, see astral-sh/uv#9838

This requires us to add `pip` as a direct dependency of pulumi.

Fixes #18023
julienp added a commit to pulumi/pulumi that referenced this issue Dec 23, 2024
Use `pip` instead of `uv pip` to read the package list when determing pulumi plugins.  `uv pip` does not support the `-v` flag, which is required to retrive the package location with `pip`, see astral-sh/uv#9838

This requires us to add `pip` as a direct dependency of pulumi.

Fixes #18023
julienp added a commit to pulumi/pulumi that referenced this issue Dec 23, 2024
Use `pip` instead of `uv pip` to read the package list when determing pulumi plugins.  `uv pip` does not support the `-v` flag, which is required to retrive the package location with `pip`, see astral-sh/uv#9838

This requires us to add `pip` as a direct dependency of pulumi.

Fixes #18023
julienp added a commit to pulumi/pulumi that referenced this issue Dec 23, 2024
Use `pip` instead of `uv pip` to read the package list when determing pulumi plugins.  `uv pip` does not support the `-v` flag, which is required to retrive the package location with `pip`, see astral-sh/uv#9838

This requires us to add `pip` as a direct dependency of pulumi.

Fixes #18023
julienp added a commit to pulumi/pulumi that referenced this issue Dec 23, 2024
Use `pip` instead of `uv pip` to read the package list when determing pulumi plugins.  `uv pip` does not support the `-v` flag, which is required to retrive the package location with `pip`, see astral-sh/uv#9838

This requires us to add `pip` as a direct dependency of pulumi.

Fixes #18023
github-merge-queue bot pushed a commit to pulumi/pulumi that referenced this issue Dec 24, 2024
Use `pip` instead of `uv pip` to read the package list when determing
pulumi plugins. `uv pip` does not support the `-v` flag, which is
required to retrive the package location with `pip`, see
astral-sh/uv#9838

This requires us to add `pip` as a direct dependency of pulumi.

Fixes #18023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with a specification or another tool
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants