Skip to content

PEP 825: Collected updates - #5110

Open
konstin wants to merge 23 commits into
python:mainfrom
wheelnext:pep-825-integration
Open

PEP 825: Collected updates#5110
konstin wants to merge 23 commits into
python:mainfrom
wheelnext:pep-825-integration

Conversation

@konstin

@konstin konstin commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

This PR collates several updates to PEP 825 (https://discuss.python.org/t/pep-825-wheel-variants-package-format-split-from-pep-817/106196).

Change History

26-Aug-2026

  • Added pep825-metadata-consistency as an appendix, setting out
    why the metadata consistency_ requirements are justified and what
    they cost. Summarized the metadata consistency argument in the
    Rationale.
  • Closed the open issue on the use of variant environment markers.
    The investigation in the appendix settles the question in favour of
    markers, so the Open Issues section has been removed and the
    reasoning recorded in the Rationale instead.
  • Removed grouping by build numbers, instead relegating them to
    tie-breaking along with other wheel properties. This reverts a
    potential change in behavior for non-variant wheels.
  • Added a high-level overview to "variant ordering and selection",
    clarified that the ordering of the lists used in the algorithm is
    from the most preferable to the least preferable and that the
    ordering by platform compatibility tags is not changed.

rgommers and others added 23 commits August 31, 2026 21:28
Add peps/pep-0825/appendix-metadata-consistency.rst, setting out why the
metadata consistency requirements are justified, what they cost, and what
they deliberately leave open. It covers the 2024 "Enforcing consistent
metadata" DPO thread and the status of its two prominent cases, the resolver
cost that forced dependency divergence would impose, and why divergent variant
metadata specifically is incoherent rather than expressive.

It includes a survey of which build backends can emit
`Dynamic: Requires-Dist` in wheel METADATA, which establishes that the
alternative to variant environment markers is reachable today only through
`setuptools` with a `setup.py`.

Summarize the argument in a new "Variant metadata consistency" subsection
of the Rationale, and cross-reference the appendix from the specification.

Close the open issue on the use of variant environment markers. The
investigation settles the question in favour of markers, so the Open
Issues section is removed and the reasoning is recorded at the end of the
"Variant environment markers" rationale instead.
Provide a high-level description of how ordering works and what it is
meant to achieve, in addition to the precise algorithm provided right
now.  Add clarifications to the algorithm, to make it clear in what
order the lists are actually arranged.

Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
This mainly removes duplication in phrasing, so it should improve
clarity while being less verbose.
Co-authored-by: Michał Górny <mgorny@quansight.com>
Co-authored-by: Michał Górny <mgorny@quansight.com>
- Use the ``nvidia`` namespace in the example. The rest of the PEP uses
  ``nvidia`` as the namespace with ``cuda_version_lower_bound`` and
  ``sm_arch`` as features within it; ``cuda`` was not a namespace
  anywhere else.
- "this yields most preferred wheel" -> "the most preferred wheel".
- Restore the second blank line before the "Ordering algorithm" heading,
  matching every other subsection that follows body text.
Replace the prose ordering example with Python code that sorts four
variant wheels, and drop the "To express it with Python types" paragraph,
which the code now covers.
State up front that variant wheels sort as Python sorts lists of tuples,
pin the direction so the run-out case is unambiguous, and move the
algorithmic spelling-out behind an explicit "Spelled out:" so readers can
skip whichever version they don't need.
``gpu_v4`` reads as "version 4 of the GPU". Bind the microarchitecture
level to the CPU part instead, giving ``gpu``, ``gpu_cpuv2``,
``gpu_cpuv4`` and ``cpuv4``.
@konstin
konstin requested review from a team, dstufft and warsaw as code owners August 31, 2026 19:31
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 pep-previews | 🛠️ Build #34318552 | 📁 Comparing a6278c6 against latest (fa5792c)

  🔍 Preview build  

2 files changed
+ pep-0825/appendix-metadata-consistency/index.html
± pep-0825/index.html

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.

3 participants