-
Notifications
You must be signed in to change notification settings - Fork 37
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
Should the output from packaging.tags.sys_tags()
take precedence over distlib.wheel.compatible_tags()
?
#219
Comments
distlib.wheel.compatible_tags()
vs packaging.tags.sys_tags()
take precedence?packaging.tags.sys_tags()
take precedence over distlib.wheel.compatible_tags()
?
They are two separate, independent packages, and should deliver the same result. Both should support PEP425, but PEPs can change, and these are volunteer projects that proceed at different rates based on volunteer time available, It's possible that there is a bug in the
Where exactly did you read this? It may be that certain people prefer certain libraries, but apart from that I'm not sure that there is a reference implementation - as far as I understand it, the point of a PEP is to allow multiple independent implementations to exist. Can you give more details about your environment where the two APIs give different results? |
I think the issue is that the tag spec doesn't actually define what tags must be supported in a given environment, so the actual result is implementation dependent (based on which library you use). Most packaging tools use the |
Thanks both! That's interesting and helpful. If most packaging tools use the
I'd suggest the first to follow the principles outlined in PEP 20 ("There should be one-- and preferably only one --obvious way to do it"). |
As a matter of principle, I'd prefer it if the standards were improved to ensure that we documented the correct tags to use - if it matters for interoperability that two tools don't say different things about what wheels are compatible with any given platform, then the standards should reflect that. Doing this would be quite a lot of work, though. As a practical solution, I'd be inclined to say that My least favourite solution would be to just use But as the project maintainer, @vsajip may have a different (probably more practical 🙂) view, which should take precedence over the above. |
Interesting - thanks! Would be curious to hear your take @vsajip - and happy to write the PR in the direction we agree to take it in. |
Before saying what the solution should be, I'd rather know more about the problem - namely, under what circumstances do the results of the two libraries differ? That would perhaps lead to answering the question of why/how they differ, and that in turn could lead to possible solutions. Adopting In any case, I think more information on the differences in results is needed before deciding how best to proceed. |
That's fair. I'll look into it when I have some time and loop back. |
Problem
I'm not downloading all the packages that I'm expecting. This is due to
distlib.wheel.compatible_tags()
returning a smaller set of tag combinations thanpackaging.tags.sys_tags()
.Context
I can see that they're different implementations and from reading online
packaging.tags.sys_tags()
seems to be the reference implementation for PEP 425 (please correct me if I'm wrong).Questions
Does this mean that the output that I get from
packaging.tags.sys_tags()
should take precedence than the one fromdistlib.wheel.compatible_tags()
?If so, why doesn't
distlib
import and usepackaging.tags.sys_tags()
to maintain consistency withpackaging
?The text was updated successfully, but these errors were encountered: