<div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr">On Fri, 26 Jan 2018, 21:21 Paul Moore, <<a href="mailto:p.f.moore@gmail.com" target="_blank">p.f.moore@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 26 January 2018 at 15:11, Pradyun Gedam <<a href="mailto:pradyunsg@gmail.com" target="_blank">pradyunsg@gmail.com</a>> wrote:<br>
> Installing a package with extras would not store information about the fact<br>
> that the extras were requested. This means, later, it is not possible to<br>
> know which extra-based optional dependencies of a package have to be<br>
> considered when verifying that the packages are compatible with each other.<br>
> This information is relavant for resolution/validation since without it, it<br>
> is not possible to know which the extra-requirements to care about.<br>
><br>
> As an example, installing ``requests[security]`` and then uninstalling<br>
> ``PyOpenSSL`` leaves you in a state where you don't really satisfy what was<br>
> asked for but there's no way to detect that either.<br>
<br>
1. pip uninstall doesn't check validity, so there's no issue for the uninstall<br>
2. pip check needs this information if it's to complain, and I believe<br>
that's the key point in your question<br></blockquote></div><div><br></div><div>Indeed. Thanks for adding this clarification. I guess this answers Alex's question as well.</div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I think that if we want pip check to validate this situation, we need<br>
to store the data when we install. Where we store it needs to be<br>
decided - I'd assume it would go in the dist-info directory for<br>
requests somewhere, and that's the bit of metadata that needs<br>
agreeing.<br>
<br>
Is there any other place where current functionality needs this<br>
information, *apart* from pip check? Are there any proposed additional<br>
features that might need it?<br></blockquote></div><div><br></div><div>Yes. I currently have a branch where during pip install, after the packages to be installed are selected, it does a pip check on what would be the installed packages if the installation is successful. This would mean that if we do select an incompatible version for installation, pip install would be able to print a warning.</div><div><br></div><div>In other words, a pip check would be done during every pip install run.</div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> Thus, obviously, I'm interested in making pip to be able to store this<br>
> information. As I understand, this is done needs to be specified in a PEP<br>
> and/or on PyPUG's specification page.<br>
><br>
> To that end, here's seeding proposal for the discussion: a new<br>
> `extras-requested.txt` file in the .dist-info directory, storing the extra<br>
> names in a one-per-line format.<br>
<br>
Looks OK to me.<br>
<br>
But I don't know how important it is to satisfy this use case. I've<br>
never needed this feature (I don't think I've ever used pip check, and<br>
I've very rarely used extras) so I won't comment on that.<br>
<br>
Paul<br>
<br>
PS I know we talked a bit off-list about this and I said I didn't have<br>
any opinion. I'd misunderstood what you were suggesting a bit, mostly<br>
because the conversation veered off into uninstalling<br>
requests[security] and what that means... So now that you've restated<br>
the issue, I have a bit of an opinion (although still not much :-))<br></blockquote></div><div><br></div><div>Hehe. No problems. :) </div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div>