uv/crates/uv
Chan Kang 9bb548d251
Implement "Requires" field in `pip show` (#2347)
## Summary
Follow-up for
395be442fc

adds `Requires` field to pip show output.

I've aimed to make it behave exactly the same as `pip` does for now, but
there seem to be subtle issues that may require some discussion going
forward:
- Should `uv pip show` support extras? `pip` has an open issue for it,
but currently does not support https://github.com/pypa/pip/issues/4824.
- Relatedly, `Requred-by` field (not implemented in this PR) in `pip
show` currently doesn't take the extras into account transparently, i.e.
when `PySocks` has been installed as an extra for `requests[socks]`,
`pip show PySocks` doesn't have `requests` or `requests[socks]` under
`Requred-by` field. Should `uv pip show` for now just replicate `pip`'s
behavior for now for simplicity and parity or try to cover the extras
for completeness?

## Test Plan
Added a couple of tests:
1. `requests==2.31.0` has four dependencies that would be ordered
differently unless sorted. Additionally, it has two dependencies that
are optionally included for extras.
2. `pandas==2.1.3` depends on different versions of `numpy` depending on
the python version used.
2024-03-12 04:35:22 +00:00
..
src Implement "Requires" field in `pip show` (#2347) 2024-03-12 04:35:22 +00:00
tests Implement "Requires" field in `pip show` (#2347) 2024-03-12 04:35:22 +00:00
Cargo.toml Add a `-vv` log level and make `-v` more readable (#2301) 2024-03-11 08:58:31 +01:00
build.rs Add `fs_err` to `disallowed_method` in clippy.toml (#1950) 2024-02-26 14:15:07 +00:00