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

Remaining work on uv pip show #2526

Open
2 of 3 tasks
danielhollas opened this issue Mar 18, 2024 · 6 comments
Open
2 of 3 tasks

Remaining work on uv pip show #2526

danielhollas opened this issue Mar 18, 2024 · 6 comments
Labels
compatibility Compatibility with a specification or another tool

Comments

@danielhollas
Copy link

danielhollas commented Mar 18, 2024

This is a follow-up to #1594 to track the remaining work to reach pip compatibility (ordered by importance)

  • Required-by field (extremely useful)
  • Editable project location
  • Other fields that are less important imo: Summary, Home-page, Author, Author-email, License

Current example uv output (for an editable package)

Name: aiidalab-qe
Version: 24.4.0a2
Location: /home/hollas/atmospec/aiidalab-qe/.venv/lib/python3.12/site-packages
Requires: aiida-core, aiida-pseudo, aiida-quantumespresso, aiidalab-widgets-base, filelock, importlib-resources, jinja2

Compare to pip output

Name: aiidalab_qe
Version: 24.4.0a2
Summary: Package for the AiiDAlab QE app
Home-page: https://github.com/aiidalab/aiidalab-qe
Author: Carl Simon Adorf, Aliaksandr Yakutovich, Marnik Bercx, Jusong Yu
Author-email: aiidalab@materialscloud.org
License: MIT
Location: /home/hollas/atmospec/aiidalab-qe/.venv/lib/python3.12/site-packages
Editable project location: /home/hollas/atmospec/aiidalab-qe
Requires: aiida-core, aiida-pseudo, aiida-quantumespresso, aiidalab-widgets-base, filelock, importlib-resources, Jinja2
Required-by: 

Thank you so much @ChannyClaus for the current implementation! 👏

@zanieb zanieb added the compatibility Compatibility with a specification or another tool label Mar 18, 2024
@eth3lbert
Copy link
Contributor

I'd like to take this issue! Before I start working on it, I have a question about output compatibility with pip.

Currently, our output warns about each missing package on a separate line. Additionally, the input packages are being sorted and deduplicated. In contrast, pip warns about missing packages in a single, combined string and preserves the original order of input packages (without deduplication).

@ChannyClaus
Copy link
Contributor

I'd like to take this issue! Before I start working on it, I have a question about output compatibility with pip.

Currently, our output warns about each missing package on a separate line. Additionally, the input packages are being sorted and deduplicated. In contrast, pip warns about missing packages in a single, combined string and preserves the original order of input packages (without deduplication).

which version of pip are you using? the one i'm using (23.2.1, also tried on 24.0) seems to be sorting the input packages:

$  pip show blah asdf blah
WARNING: Package(s) not found: asdf, blah, blah

keeping the de-duplication + single-line warning for multiple missing packages seem like better UX to me but i'm not a maintainer :)

@eth3lbert
Copy link
Contributor

Ah, you're right. The missing packages section is indeed sorted, only the response details are not.

pip 24.0:

$ pip show six blah asdf blah python-dateutil six
WARNING: Package(s) not found: asdf, blah, blah
Name: six
Version: 1.16.0
Summary: Python 2 and 3 compatibility utilities
Home-page: https://github.com/benjaminp/six
Author: Benjamin Peterson
Author-email: benjamin@python.org
License: MIT
Location: /Users/user/uv/.venv/lib/python3.12/site-packages
Requires: 
Required-by: python-dateutil
---
Name: python-dateutil
Version: 2.9.0.post0
Summary: Extensions to the standard Python datetime module
Home-page: https://github.com/dateutil/dateutil
Author: Gustavo Niemeyer
Author-email: gustavo@niemeyer.net
License: Dual License
Location: /Users/user/uv/.venv/lib/python3.12/site-packages
Requires: six
Required-by: 
---
Name: six
Version: 1.16.0
Summary: Python 2 and 3 compatibility utilities
Home-page: https://github.com/benjaminp/six
Author: Benjamin Peterson
Author-email: benjamin@python.org
License: MIT
Location:  /Users/user/uv/.venv/lib/python3.12/site-packages
Requires: 
Required-by: python-dateutil

@zanieb
Copy link
Member

zanieb commented Mar 21, 2024

I don't think matching pip's output is important here, I'd lean towards retaining the current ux.

@Andrei-Aksionov
Copy link

I don't think matching pip's output is important here, I'd lean towards retaining the current ux.

Current implementation doesn't show Required-by info. And this is the only reason why I use pip show.

zanieb pushed a commit that referenced this issue Mar 25, 2024
<!--
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

<!-- What's the purpose of the change? What does it do, and why? -->

- Displays missing packages as single-line warnings.
- Adds support for `Editable project location` and `Required-by` fields
in `pip show`.

Part of #2526.
zanieb pushed a commit that referenced this issue Mar 25, 2024
<!--
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

<!-- What's the purpose of the change? What does it do, and why? -->

- Displays missing packages as single-line warnings.
- Adds support for `Editable project location` and `Required-by` fields
in `pip show`.

Part of #2526.
zanieb pushed a commit that referenced this issue Mar 25, 2024
<!--
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

<!-- What's the purpose of the change? What does it do, and why? -->

- Displays missing packages as single-line warnings.
- Adds support for `Editable project location` and `Required-by` fields
in `pip show`.

Part of #2526.
zanieb added a commit that referenced this issue Mar 26, 2024
<!--
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

<!-- What's the purpose of the change? What does it do, and why? -->

- Displays missing packages as single-line warnings.
- Adds support for `Editable project location` and `Required-by` fields
in `pip show`.

Part of #2526.

# Conflicts:
#	crates/uv-dispatch/src/lib.rs
#	crates/uv-resolver/src/resolver/mod.rs
#	crates/uv-resolver/tests/resolver.rs
#	crates/uv-traits/src/lib.rs
#	crates/uv/src/commands/pip_compile.rs
zanieb added a commit that referenced this issue Mar 27, 2024
<!--
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

<!-- What's the purpose of the change? What does it do, and why? -->

- Displays missing packages as single-line warnings.
- Adds support for `Editable project location` and `Required-by` fields
in `pip show`.

Part of #2526.

# Conflicts:
#	crates/uv-dispatch/src/lib.rs
#	crates/uv-resolver/src/resolver/mod.rs
#	crates/uv-resolver/tests/resolver.rs
#	crates/uv-traits/src/lib.rs
#	crates/uv/src/commands/pip_compile.rs

# Conflicts:
#	crates/uv/src/commands/pip_sync.rs
zanieb added a commit that referenced this issue Mar 27, 2024
<!--
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

<!-- What's the purpose of the change? What does it do, and why? -->

- Displays missing packages as single-line warnings.
- Adds support for `Editable project location` and `Required-by` fields
in `pip show`.

Part of #2526.

# Conflicts:
#	crates/uv-dispatch/src/lib.rs
#	crates/uv-resolver/src/resolver/mod.rs
#	crates/uv-resolver/tests/resolver.rs
#	crates/uv-traits/src/lib.rs
#	crates/uv/src/commands/pip_compile.rs

# Conflicts:
#	crates/uv/src/commands/pip_sync.rs
zanieb added a commit that referenced this issue Mar 27, 2024
<!--
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

<!-- What's the purpose of the change? What does it do, and why? -->

- Displays missing packages as single-line warnings.
- Adds support for `Editable project location` and `Required-by` fields
in `pip show`.

Part of #2526.

# Conflicts:
#	crates/uv-dispatch/src/lib.rs
#	crates/uv-resolver/src/resolver/mod.rs
#	crates/uv-resolver/tests/resolver.rs
#	crates/uv-traits/src/lib.rs
#	crates/uv/src/commands/pip_compile.rs

# Conflicts:
#	crates/uv/src/commands/pip_sync.rs
zanieb added a commit that referenced this issue Mar 27, 2024
<!--
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

<!-- What's the purpose of the change? What does it do, and why? -->

- Displays missing packages as single-line warnings.
- Adds support for `Editable project location` and `Required-by` fields
in `pip show`.

Part of #2526.

# Conflicts:
#	crates/uv-dispatch/src/lib.rs
#	crates/uv-resolver/src/resolver/mod.rs
#	crates/uv-resolver/tests/resolver.rs
#	crates/uv-traits/src/lib.rs
#	crates/uv/src/commands/pip_compile.rs

# Conflicts:
#	crates/uv/src/commands/pip_sync.rs
@mbway
Copy link

mbway commented Apr 5, 2024

uv is also missing support for show --files which shows the path of each file belonging to the package under a Files heading

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

No branches or pull requests

6 participants