Editable project location and Required-by for pip show#2589
Editable project location and Required-by for pip show#2589zanieb merged 5 commits intoastral-sh:mainfrom
Editable project location and Required-by for pip show#2589Conversation
editable project location and required-by for pip showEditable project location and Required-by for pip show
| return Ok(ExitStatus::Failure); | ||
| } | ||
|
|
||
| // Since Requires and Required-by fields need data parsed from metadata, especially the |
There was a problem hiding this comment.
@charliermarsh or @konstin could you review this section?
There was a problem hiding this comment.
Sorry i missed the ping, code looks good
| Location: [WORKSPACE_DIR]/site-packages | ||
| Editable project location: [EDITABLE_INSTALLS_PREFIX]poetry_editable | ||
| Requires: anyio | ||
| Required-by: |
There was a problem hiding this comment.
I wonder if we should omit these when they're empty
There was a problem hiding this comment.
I followed the approach used by pip. I have no preference, either option is fine.
There was a problem hiding this comment.
I'd vote to keep pip bwhaviour, otherwise users can wonder if it is even implemented.
There was a problem hiding this comment.
I don't think being worried that people will wonder if it it's implemented makes sense as a long-term choice. It seems likely if you care about this feature that you'll have at least one package with Required-by set. I don't have strong feelings but I'd lean towards omitting empty fields. Curious for others' thoughts though cc @konstin
There was a problem hiding this comment.
I don't have an opinion on that, we could add (none) as placeholder if it helps
|
Thanks for contributing! |
|
Awesome. One small thing from the linked issue: if it isn't too much extra work it would be nice to display Summary and Home page as well. Those are nice for packages with which one is not familiar. |
|
@danielhollas I wouldn't expand the scope of this pull request, it's better to implement things separately. |
|
Totally agree! But then please don't close the issue since it's not fully resolved : 😅 |
|
The implementation itself shouldn't be difficult. However, those fields also come from metadata, which are not stored in |
<!-- 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.
<!-- 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.
<!-- 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
<!-- 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
<!-- 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
<!-- 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
<!-- 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
Summary
Editable project locationandRequired-byfields inpip show.Part of #2526.