-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Installation/resolution report (aka pip install --dry-run --report) #10771
Conversation
91143de
to
7d69557
Compare
I have updated this PR to produce hashes in more situations. The only missing part is the integration with the wheel cache (on which I started working in #11042). All in all, this seems to fit pretty neatly in the pip code base. The hardest remaining part is to produce PEP 566 compliant metadata. To achieve this we may need to vendor Also If there is positive feedback in the short term (especially from people who want to produce lock files with hashes) I'm motivated to push this forward. I may be able free up some time in May so as to land this as an experimental feature in 22.2 (July). |
I have an implementation that converts a |
503702f
to
dec28be
Compare
8e8a97f
to
43b98c0
Compare
Thanks @pfmoore! I extracted your The PR is still pretty small but it will grow with tests and docs etc. So my plan is to split it in easier to review chunks
In the meantime, this branch is ready for experimenters, and I'm happy to discuss / bikeshed the report schema here. |
I am about to propose basing #10748 off of this PR, since I really like the formalization of metadata parsing in I had written a whole treatise trying to convince you to move this to
And as i am about to propose in #10748, I think I can make that PR additionally avoid downloading any dists when EDIT: see proposal at #10748 (comment) (which doesn't change anything here, just refactors that PR to consume this one). |
@cosmicexplorer actually the
I'll look into it. This could make sense if we use it in another context than the install command. |
1682a1e
to
cc3844f
Compare
I rebased on top of the other PRs and added integration tests. This is now feature complete. I keep it draft until the other PRs are merged but this PR (i.e. the last commit) is now simple as it can get. |
cc3844f
to
457851d
Compare
457851d
to
7dc37c4
Compare
f18601d
to
6520d93
Compare
Thanks @uranusjr! Also, the groundwork that was required to make this PR simple will be useful for other things. |
I have made a last tweak to this one. Instead of a dict keyed by canonical distribution name, the |
I plan to merge this in about a week so it goes in 22.2, if there are no other comments or concerns in the meantime. |
Also, affirm the experimental status of the feature.
0cc7a39
to
d11f3c3
Compare
9547ebe
to
074c6b5
Compare
Thanks a lot to all who contributed to this! |
Just wanted to say as a downstream user: thanks a ton for adding this! |
Following the conversation in #10748 and @cosmicexplorer 's request that I describe more precisely what I had in mind I created this
proof-of-concept.The output is conceptually very similar to #10748, but generated as part of the install command.
It enables the following use cases:
It is not exactly the same as I take the opportunity to experiment a little bit on the output format.
My goal here is to have a standards based output, using PEP 610 for
download_info
and PEP 566 formetadata
.So far I did not need to intrude into the resolver innards as I can obtain all the information from
InstallRequirement
, by the way of a minor change to the preparer to record the downloaded artifact.Missing so far, compared to #10748, is dependencies and required python information, but this will be part of the metadata field obtained form the distribution metadata. TODO about metadata is convert it to PEP 566 json.Dependencies and required python information are part of the metadata fields in PEP 566 json format.
Here is an example:
$ pip install "pydantic>=1.9" git+https://github.com/pypa/packaging@main --report=/tmp/report.json --ignore-installed --dry-run --no-cache
Please let me know your thoughts and if I'm missing anything.
Closes #53
Closes #6430