-
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
Use data-dist-info-metadata (PEP 658) to decouple resolution from downloading #11111
Conversation
c14e74d
to
0fdaf8b
Compare
I'm here to say that it's almost 01:11:11 where I am, and I really like this PR's number. :) |
cfc14e8
to
e9205ee
Compare
@sbidoul: I was able to disentangle |
52cb80c
to
69e28eb
Compare
Hmm... I don't think the PEP 658 code path needs to be behind the fast-deps flag. It is standard-backed behaviour, which should be implemented in a way that makes things work. |
Beyond that, I have to pack for a trip -- so I won't be able to look at this properly for ~a month (unless I end up looking at this at the airport or whatever). :) I'm reallly excited that you've done this work though @cosmicexplorer! While I've been a bit busy getting the 21.1 release out, I'm looking forward to getting this PEP landed, hopefully in time for the next release cycle in a couple of months. ^.^ |
I don’t think this should be behind a flag either. Instead, it should be done in a way that works by default, and falls back gracefully if the server does not provide this information. Thanks a ton for doing this though! This is something I’ve been thinking about but never had the time for. |
This totally makes sense! Luckily the implementation from @McSinyx was so nice that it was very easy to incorporate this metadata-only resolution without needing to activate |
e43e167
to
b36ae5a
Compare
Thanks so much for the timeline!!! I really appreciate these updates. There's no rush on my end, so please just come back to this as you have time. For my part I'll work to make this mergeable so you can hopefully breeze through it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation and tests LGTM. One minor comment. :)
Also, could you rebase this? :)
You should be aware that we have an implementation of PEP 691 now. It's possible that the merge conflicts might not indicate that you might need some parallel logic for the case of a JSON format index. Also, while it will be great to have this in pip, PyPI still doesn't actually serve any projects with |
Yea, I'd prefer to take the same approach as PEP 591 -- we implemented the data-yanked handling in pip quite a while before PyPI implemented it on the index server side. :) |
b36ae5a
to
86de37b
Compare
I've only had time to skim the code, but this looks like a very reasonable refactoring, yes. |
@pfmoore: ah, I just reviewed PEP 691 and saw that it also incorporates the |
Hm, I'm seeing that there aren't already test cases for PEP 691 unless I'm misreading 6f167b5, so I'm going to do that now but put it in a separate PR to avoid inflating this one further. |
Oh nvm, I see it as |
Ok, this should be ready to review again! cc @uranusjr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment on the (internal) interface. Logic looks fine to me.
a9b5ef3
to
89f235d
Compare
45849e4
to
b579fa0
Compare
b579fa0
to
8aeb108
Compare
Problem
#10748 implements several things at once, which makes it large and difficult to review. After a recent discussion on that PR (#10748 (comment)), I realized that support for PEP 658 is totally orthogonal to generating a resolution report.
Solution
--use-feature=fast-deps
work from @McSinyx.*.metadata
files if provided by the index instead of usingLazyZipOverHTTP
. If--use-feature=fast-deps
is enabled, we then fall back toLazyZipOverHTTP
if this is unavailable (which is the case for PyPI currently, and will remain the case for any--find-links
repos).pip download --dry-run --report
! #10748 already).Result
When PyPI implements PEP 658, we will immediately be able to use it to speed up resolves!
cc @uranusjr