freenode
Languages & Toolchains

PEP 825 wheel variants format gains ground after major rewrite

Revised package metadata for selectable wheel builds is merged and draws a solid first review, while dependency-on-variant stays out of scope.

Python’s packaging community has merged a substantially revised PEP 825, the draft that defines how wheel variant metadata will live inside package files, and early reviewer feedback calls the proposal solid enough to move forward.

Wheel variants are meant to let projects ship multiple optimized builds (different hardware features, runtimes, or ABIs) without forcing every user to download a single multi-gigabyte “support everything” artifact from PyPI. Default namespace and project orderings target ordinary installers: users should get a working, smaller wheel that is better than today’s status quo, often without noticing which variant they received. Power users who already juggle multiple indexes for exact builds would get standardized selection overrides and post-install metadata instead.

Ralf Gommers restated a central design limit arrived at after long debate: a package still cannot declare a dependency on a specific variant of another project (for example torch built for a particular CUDA line). Variant resolution happens only after package and version are chosen, and does not read other packages’ variant metadata. Matching variants across a stack is expected when projects share providers and property values; encoding cross-package variant pins was judged too complex for backtracking resolvers. Related ABI coupling (wheels that must match the exact build of a library they link) is deferred to a forthcoming providers PEP via an optional abi_dependency feature, not PEP 825 itself.

Paul Moore, after an initial full read of the revised text, reported no major objections so far and described the draft as a clear improvement, with deeper review of ordering rules still underway. He did flag practical risk around metadata major-version bumps: if a popular project published a variants index file at a new version, older installers might refuse it, fall back to unoptimized wheels, or rescind caching in painful ways for large stacks such as the ML ecosystem. Authors of the draft note they mirrored Core Metadata versioning and expect any future 2.0 transition to solve coexistence in context rather than hard-coding a scheme now.

PEP 825 is scoped to the static metadata carried in the wheel; installer UX, providers, and locking behavior continue in the rest of the wheel-variants series. With the rewrite landed and core maintainers treating the package-format piece as nearly ready for editor handling, the remaining open questions are less “whether variants” than how indexes and tools will stage the first incompatible metadata change when it eventually arrives.