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

uv info or metadata high level command (keyword: outdated) #7532

Open
inoa-jboliveira opened this issue Sep 19, 2024 · 0 comments
Open

uv info or metadata high level command (keyword: outdated) #7532

inoa-jboliveira opened this issue Sep 19, 2024 · 0 comments
Labels
enhancement New feature or improvement to existing functionality wish Not on the immediate roadmap

Comments

@inoa-jboliveira
Copy link

inoa-jboliveira commented Sep 19, 2024

I was looking into library updates and #2150 would be helpful by displaying the same data pip generates. That is just partially what I need.

I decided to open a new thread since the last comment there was about people hijacking it for other requests and I don't want to disturb it further.

UV evolved so much since the --outdated flag was proposed, I believe it is best if there is both an "uv pip" interface (legacy) and a modern version for apps taking advantage of "uv sync" et al. Or just the modern version since uv proved it is not just a "fast pip". The legacy version could be just a byproduct or specialization of this for the sake of pip completeness.

My proposal is:

Provide a high level "info" or "metadata" command where it can output any known information about a package or the installed packages. It would be a superset of uv pip show and uv pip list

$ uv info
Package    Installed    Latest
--------   ---------    -------
django     5.0          5.1.1
foobar     1.1          2.3

One feature that is important to me is to know how far apart the versions are by checking the release date. Some project move from semver to calendar versioning so you jump from e.g. 2.0 to 24.8. Seeing release dates may seem less scary.

Another reason would be to find stale or dead projects. This would be an awesome use case. If you are up to date, but latest version is from 2017 it is time to replace the dependency.

$ uv info --released
Package    Installed          Latest
--------   ----------------   ----------------
django     5.0 (2023-12-04)   5.1 (2024-09-03)
foobar     1.1 (2022-02-23)   2.3 (2024-05-01)

Show the current installation (superset of uv pip show). Should also support --released next to version number

$ uv info django
Name: django
Installed Version: 5.0
Latest Version: 5.1.1
Location: ...

Show the actual package metadata so you don't need to browse pypi

$ uv info django==5.1.1 --metadata
Metadata-Version: 2.1
Name: Django
Version: 5.1.1
Summary: A high-level Python web framework that encourages rapid development and clean, pragmatic design.
Author-email: Django Software Foundation <foundation@djangoproject.com>
License: BSD-3-Clause
...

One last useful thing would be support for multiple formats, such as JSON for integrating UV into pipelines.

This command (specially the --released option) would pair quite well with the --exclude-newer global parameter.

@charliermarsh charliermarsh added enhancement New feature or improvement to existing functionality wish Not on the immediate roadmap labels Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality wish Not on the immediate roadmap
Projects
None yet
Development

No branches or pull requests

2 participants