Skip to content

PEP 825: reword ordering to avoid introducing new terms#47

Open
mgorny wants to merge 1 commit intopep-wheel-variants-acceptancefrom
pep-wheel-variants-stage
Open

PEP 825: reword ordering to avoid introducing new terms#47
mgorny wants to merge 1 commit intopep-wheel-variants-acceptancefrom
pep-wheel-variants-stage

Conversation

@mgorny
Copy link
Copy Markdown

@mgorny mgorny commented Apr 20, 2026

Reword the ordering algorithm to avoid introducing new terms. Rather than talking of abstract "variants", operate in the terms of grouping variant wheels by their labels, and creating an additional group for non-variant wheels. Then, sorting by platform compatibility tags becomes a matter of in-group ordering. Hopefully this also avoids discussing the existing ordering algorithm.


📚 Documentation preview 📚: https://wheelnext-peps--47.org.readthedocs.build/

Reword the ordering algorithm to avoid introducing new terms.  Rather
than talking of abstract "variants", operate in the terms of grouping
variant wheels by their labels, and creating an additional group for
non-variant wheels.  Then, sorting by platform compatibility tags
becomes a matter of in-group ordering.  Hopefully this also avoids
discussing the existing ordering algorithm.

Signed-off-by: Michał Górny <mgorny@quansight.com>
@read-the-docs-community
Copy link
Copy Markdown

Comment thread peps/pep-0825.rst
compatible, variants MUST be totally ordered by their variant
properties.
To determine which wheel to install when multiple wheels are compatible,
variant metadata MUST be taken into consideration. This section
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be misconstrued as saying that you have to support variants to be correct, and can't ignore variants (which we otherwise say is fine, if you're fine with not getting the best package). I think what we want to say is that you need to consider variant metadata if you want to determine the priority order between a set of wheel using variants. This way we are clear about priorities/ordering, but leave it to the tools what to do with that.

We could also approach this in a different way, and say: "This specification defines an ordering between different variant wheels based on the variant label." The implications are clear, and it also ensure that e.g. index-specific behaviors are left to the tools.

Comment thread peps/pep-0825.rst
Comment on lines +385 to +387
sorted in the order of priority. Tools that select wheels using
different algorithms MUST implement them so that they arrive at the same
result.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I consider that implied, we don't need to say that explicitly: The spec is not the algorithm, but the observed output or behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants