# Security of wheel variants

**URL:** <https://discuss.python.org/t/security-of-wheel-variants/109569>\
**Category:** Packaging\
**Created:** [October 20, 2026, 12:58pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569 "2026-10-20T12:58:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![konstin](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/konstin/32/20207_2.png) [@konstin](https://discuss.python.org/u/konstin)\
**Post date:** [October 20, 2026, 12:58pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/1 "2026-10-20T12:58:52Z")

</div>

**tl;dr: Variant providers will run no untrusted code by default. There will be a shared list of heavily vetted providers for tools to vendor or reimplement. For everything beyond that, user opt-in is required.**

The security story of wheel variants was heavily discussed as part of the previous PEP 817 thread. Here we want to propose an updated design that balances security and user experience.

To recap, we want to introduce advanced platform support, especially GPU support. Instead of hardcoding more fields into wheel filenames, we introduce variant properties through which wheels are matched to an installation target. If you’re interested in an overview on the full wheel variants proposal, check PEP 817 out. PEP 825 covers how variants are described, checked and ordered, but not where to obtain them. PEP 850 defines how to obtain them.

Roughly, variant wheels work as follows: The package author defines a variant label for each target and says what each label needs from the target platform using variant properties. The variant labels are attached to wheels behind the platform tag, extending it. The author also writes in the package metadata which variant providers are needed. The variant providers contain the actual platform detection code and emit the variant properties of the host, which the installer compares to the variant properties of the wheels.

We have three seemingly conflicting goals for variant providers: There must never be arbitrary code execution at install time \[1\], we must be able to perform advanced platform detection (such as GPU detection) at install time, and we need to evolve providers in the future. While package requirements describe variant providers by name and version, the trick is that they don’t work like regular dependencies. Instead, they encode which and what level of platform support a wheel needs, while the actual provider code is shipped with the installer.

How the installer ships the code is left to the tool: It can vendor them, like pip vendors packaging, it can reimplement them, like uv reimplements packages, it can use any secure mechanism of the tool author’s choice. This also gives us flexibility, for example it allows users to opt-in to provider plugins that are actually (internally maintained) packages to support custom hardware and software, users can provide properties through a static file where build and deploy environments are different, and users can opt-in to newer provider plugins while still using an older tool (or alternatively get a good error message about the version mismatch, where we currently have no good reporting).

Using this model has enabled more features we didn’t initially target, for example they can model different BLAS/OpenMP/etc. implementations in the build using static providers, and they can describe ABI dependencies between packages through a built-in provider, both of which can’t currently be modelled at all and require fallbacks to source distributions (and they are static or built-in respectively, so no code execution at all from a provider package). Together, this meets all of our three goals.

## Prior Art and Motivation

Python already has a repository for de-facto authoritative advanced platform detection code that is vendored and/or reimplemented by tools, [pypa/packaging](https://github.com/pypa/packaging). The [libc detection](https://github.com/pypa/packaging/blob/main/src/packaging/_elffile.py) accesses low-level operating system primitives to determine a more fine-grained platform compatibility marker, manylinux and musllinux. It is vendored or depended on by every major package manager. Initially, each manylinux tag was specified in a PEP, with detailed rules for which libraries and symbols are and aren’t allowed ([PEP 513 - manylinux1](https://peps.python.org/pep-0513/), [PEP 571 - manylinux2010](https://peps.python.org/pep-0571/), [PEP 599 - manylinux2014](https://peps.python.org/pep-0599/)). This created a maintenance burden on the Linux maintainers, delays to rollout and mismatches when Linux distributions changed in ways not anticipated by the PEP. To cite directly from [PEP 600](https://peps.python.org/pep-0600/):

> In previous manylinux PEPs (PEP 513, PEP 571, PEP 599), we’ve done this by attempting to write down in the PEP the exact set of libraries, symbol versions, Python configuration, etc. that we believed would lead to wheels that work on all mainstream glibc-based Linux systems. But this created several problems:
> 
> First, PEPs are generally supposed to be normative references: if software doesn’t match the PEP, then we fix the software. But in this case, the PEPs are attempting to describe Linux distributions, which are a moving target, and do not consider our PEPs to constrain their behavior. This means that we’ve been taking on an unbounded commitment to keep updating every manylinux PEP whenever the Linux distro landscape changes. This is a substantial commitment for unfunded volunteers to take on, and it’s not clear that this work produces value for our users.
> 
> And second, every time we move manylinux forward to a newer range of supported platforms, or add support for a new architecture, we have to go through a fairly elaborate process: writing a new PEP, updating the PyPI and pip codebases to recognize the new tag, waiting for the new pip to percolate to users, etc. None of this happens on Windows/macOS; it’s only a tax on Linux maintainers. This slows deployment of new manylinux versions, and consumes part of our community’s limited PEP review bandwidth, thus slowing progress of the Python packaging ecosystem as a whole. This is especially problematic for less-popular architectures, who have less volunteer resources to overcome these barriers.

Eventually, manylinux switched to the perennial manylinux model: There is one PEP that defines how to build future manylinux, without defining the lists of libraries and symbols. For those who still need those lists, there’s a [reference JSON document in auditwheel](https://github.com/pypa/auditwheel/tree/5ad6effd04247b066ba4213f047ab1c591b3bb6d/src/auditwheel/policy). Every future manylinux revision can be introduced by computing the new manylinux tag value and updating the JSON policies in auditwheel, without introducing any new PEPs or [packaging.python.org](http://packaging.python.org) updates.

We build upon this experience. The advanced platform support through variants is in this sense very similar to manylinux, its targets are externally defined and updated with a notable burden to maintain in Python specifications. We chose to move the entirety of the platform detection logic into the implementation, but instead of being a mostly hidden part of packaging, they are explicitly named provider plugins. Where manylinux is implicitly available as part of platform tags, variant providers need to be explicitly requested, as they are explicitly versioned.

## Auditing

Blessed providers occupy a critical position and must follow a much stricter standard than regular packages:

- No native code, only pure Python (pip allows only pure Python dependencies)
- The code must be written in the most portable way, but can be limited to the platforms of interest (for example, ROCm only supports Linux and Windows, so it can use Linux- and Windows-specific functions and return an empty result otherwise)
- No dependencies, except the two standard packages `packaging` and `archspec` (which tools also need to vendor)
- A permissive open source license, such as Apache 2/MIT, UNLICENSE, CC0 (GPL is not possible)
- Limit the amount of `ctypes`, `struct` and similar C-wrapping modules to a minimum. While sometimes unavoidable (it’s e.g. required for manylinux detection), C-style code is notoriously hard to review and audit.
- The code must be written in a way that it is trivial to audit for malicious or vulnerable behavior. This imposes a limit on how big a provider plugin can be, if it has too much code, it fails this auditing check.

This is a list of minimal requirements, only focused on security. A blessed provider requires following the highest code quality requirements: If tool maintainers lack confidence in an implementation where they say they can’t justify vendoring it, it cannot land.

These are all security requirements, not correctness requirements, which are outside the scope of this proposal. You can only properly check if such code works by running it on the target platform and hardware, so we avoid imposing validation requirements.

Note that this is not an adversarial process: Only because something is not explicitly banned here does not mean it’s allowed. If something is insecure or in another way a bad idea, it will be rejected in code review, just like it would be rejected as a regular PR to pip, uv, or any other package manager. For example, we haven’t explicitly banned accessing the user’s documents in the list: That is something that pip and uv clearly must not do, so it’s also something that a provider must not do.

Adding a provider to this list is a major commitment for the ecosystem. We’ll propose a list of initial provider plugins in a future proposal. This list will naturally be limited, and there is a high bar for adding new ones. This thread is focused on building confidence in the security story around providers.

## Governance

The list and implementations of blessed providers will be maintained in a GitHub repository. Day-to-day, the maintenance will take place in the repository, with decisions being made through the regular code review process, similar to packaging. The PPC will appoint the initial list of maintainers. Experts from the relevant vendors will be involved to ensure we match their software and hardware compatibility. Changes to the list or significant changes to the provider inputs or outputs require consensus between maintainers of the affected tools. Where a consensus cannot be reached that way, the Python Packaging Council (PPC) decides. While the PPC ultimately decides, avoiding both gridlocks and “rogue” decisions, experience shows that most work doesn’t need committee involvement. Historically, there are rather too few than too many people on such projects. A dedicated provider repository also makes vendor involvement easier, which helps with maintenance.

Initially, we suggest this repository lives under [https://github.com/pypa](https://github.com/pypa) or [https://github.com/python](https://github.com/python), this is still up to decision. This may change as the PPC evolves PyPA governance ([PEP 772 – Packaging Council governance process | peps.python.org](https://peps.python.org/pep-0772/#pypa)).

## Rust and Python

The Python (packaging) ecosystem has evolved to one where Rust tools exist alongside Python tools, the most widely used packaging tools being pip (Python) and uv (Rust). This means we can’t only have Python code or specify std functions to use. Instead, we define a reference Python implementation and allow projects in other languages (or those that simply don’t want to use the reference implementation) to use a reimplementation in Rust or any other language. For ecosystem coherence we require that the platform detection methods and the output variant properties match. From our experience with uv, this is not a compatibility risk, but rather a check for the Python implementation that catches problems in the reference implementation.

## Acknowledgements

Thanks to Seth Larson and Mike Fiedler for the helpful discussions on security.

* * *

1. Beyond the existing capabilities such as source distribution builds and arbitrary code execution by side-effect, such as sitecustomize.py, which are outside the scope of this PEP

---

<div class="post-metadata">

**Author:** ![cjames23](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/cjames23/32/32376_2.png) [@cjames23](https://discuss.python.org/u/cjames23)\
**Post date:** [October 20, 2026, 4:14pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/2 "2026-10-20T16:14:35Z")

</div>

> [@konstin](#):
>
> it allows users to opt-in to provider plugins that are actually (internally maintained) packages to support custom hardware and software, users can provide properties through a static file where build and deploy environments are different, and users can opt-in to newer provider plugins while still using an older tool

Thank you for this! This was my biggest push back when there was a conversation around variants at SciPy 2025, was that the provider plugins need to be opt-in so that I can control where they come from in a network jail build environment.

---

<div class="post-metadata">

**Author:** ![cofiem](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/cofiem/32/12747_2.png) [@cofiem](https://discuss.python.org/u/cofiem)\
**Post date:** [November 6, 2026, 10:32am UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/3 "2026-11-06T10:32:44Z")

</div>

Thanks for all the work, and the prior art and auditing discussion here.

The variant providers approach seems ok to me, particularly the emphasis on how provider plugins will be written and managed, and the opt-in for less-common providers.

Some questions:

Given that there are a few private companies (e.g. AMD, NVIDIA) that will need to contribute open source code for system information detection, is there any risk of those companies not wanting to have that detection code in the open source packages?

Is there any concern that the additional variant data in the package (PEP 825 Package Format) or the potential for misleading / obscure metadata (PEP 850 Providers) being a security issue? For example, a package with large variant details or a subtle misspelling of a provider?

I’m confused about whether the static data (data about the system available without installing or running any plugins) has been defined or not. It looks like there’s an example here [PEP 817 – Wheel Variants: Beyond Platform Tags | peps.python.org](https://peps.python.org/pep-0817/#using-static-compatibility-information) , but I’ve also seen a few places that say the format is deferred. I think it would be useful for the Security Implications section in PEP 850 Providers to mention using static data about the system instead of plugins, and whether there are any concerns around how that static data is created - could someone be tricked into creating static data about their system that installed a variant wheel that caused issues?

> (PEP 850) The tool SHOULD implement a way for the user to provide a static list of compatible features and their values for a particular provider. Standardizing this format is left to a future PEP

---

<div class="post-metadata">

**Author:** ![konstin](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/konstin/32/20207_2.png) [@konstin](https://discuss.python.org/u/konstin)\
**Post date:** [November 6, 2026, 12:24pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/4 "2026-11-06T12:24:15Z")

</div>

Let me answer your questions one-by-one:

> [@cofiem](#):
>
> Given that there are a few private companies (e.g. AMD, NVIDIA) that will need to contribute open source code for system information detection, is there any risk of those companies not wanting to have that detection code in the open source packages?

No, this is part of the application interface, not the driver interface.

> [@cofiem](#):
>
> Is there any concern that the additional variant data in the package (PEP 825 Package Format) or the potential for misleading / obscure metadata (PEP 850 Providers) being a security issue? For example, a package with large variant details or a subtle misspelling of a provider?

I don’t see a potential for that. If a provider is misspelled, you’ll get an error that the provider isn’t allowlisted. If a value in the properties is misspelled, it’s a regular bug.

> [@cofiem](#):
>
> I’m confused about whether the static data (data about the system available without installing or running any plugins) has been defined or not. It looks like there’s an example here [PEP 817 – Wheel Variants: Beyond Platform Tags | peps.python.org](https://peps.python.org/pep-0817/#using-static-compatibility-information) , but I’ve also seen a few places that say the format is deferred. I think it would be useful for the Security Implications section in PEP 850 Providers to mention using static data about the system instead of plugins, and whether there are any concerns around how that static data is created - could someone be tricked into creating static data about their system that installed a variant wheel that caused issues?

We want to create a static format eventually, but it’s too early for that. Right now, we encourage tools to experiment with different formats, so we can learn what does and doesn’t work.

---

<div class="post-metadata">

**Author:** ![mgorny](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/mgorny/32/34029_2.png) [@mgorny](https://discuss.python.org/u/mgorny)\
**Post date:** [November 10, 2026, 6:35pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/5 "2026-11-10T18:35:02Z")

</div>

Given that nobody seems to have concerns with the high-level idea so far, let’s try to make it a bit more precise.

> [@konstin](#):
>
> The list and implementations of blessed providers will be maintained in a GitHub repository. Day-to-day, the maintenance will take place in the repository, with decisions being made through the regular code review process, similar to packaging. The PPC will appoint the initial list of maintainers. Experts from the relevant vendors will be involved to ensure we match their software and hardware compatibility.

I’m guessing this implies that if the group decides to accept a new blessed provider, said provider is added to the repository and their author(s) become part of the group. Does that sound correct?

Do we expect the day-to-day maintenance to be primarily handled by the dedicated plugin maintainer, or do we expect cross-review for every change?

> [@konstin](#):
>
> Changes to the list or significant changes to the provider inputs or outputs require consensus between maintainers of the affected tools.

Sorry, what are “the affected tools” here? Are we talking about the repository maintainers specifically, or the wider packaging tool community?

* * *

On a somewhat related note, do we require that packaging tools include all blessed providers, or can choose a subset of them?

---

<div class="post-metadata">

**Author:** ![konstin](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/konstin/32/20207_2.png) [@konstin](https://discuss.python.org/u/konstin)\
**Post date:** [November 10, 2026, 7:23pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/6 "2026-11-10T19:23:14Z")

</div>

> [@mgorny](#):
>
> I’m guessing this implies that if the group decides to accept a new blessed provider, said provider is added to the repository and their author(s) become part of the group. Does that sound correct?

Yes

> [@mgorny](#):
>
> Do we expect the day-to-day maintenance to be primarily handled by the dedicated plugin maintainer, or do we expect cross-review for every change?

I expect we’ll have required approvals, and the repo itself gives us a lot of visbility. For day-to-day, I’m thinking of changes like [Add TPU v8 series device IDs by gr455 · Pull Request #5 · wheelnext/tpu-variant-provider · GitHub](https://github.com/wheelnext/tpu-variant-provider/pull/5).

> [@mgorny](#):
>
> Sorry, what are “the affected tools” here? Are we talking about the repository maintainers specifically, or the wider packaging tool community?

The packaging platforms and tools: PyPI, uv, pip, hatch, poetry, pdm, etc. Torch, tensorflow and jax are also relevant when there’s e.g. change to Nvidia microarchitecture targets.

> [@mgorny](#):
>
> On a somewhat related note, do we require that packaging tools include all blessed providers, or can choose a subset of them?

The idea is that there is a set of providers that a package author can rely on being available, so I’d say it’s required to vendor all of them. If there’s a provider that some tools wouldn’t include, it probably shouldn’t go on the list in the first place.

---

<div class="post-metadata">

**Author:** ![pf\_moore](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pf_moore/32/35_2.png) [@pf\_moore](https://discuss.python.org/u/pf_moore)\
**Post date:** [November 10, 2026, 7:57pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/7 "2026-11-10T19:57:55Z")

</div>

> [@konstin](#):
>
> The idea is that there is a set of providers that a package author can rely on being available, so I’d say it’s required to vendor all of them. If there’s a provider that some tools wouldn’t include, it probably shouldn’t go on the list in the first place.

I’d like to understand the direction of the requirement here. Which of the following is being proposed?

1. If a provider gets added to the list of blessed providers, pip (for example) will be required to vendor it (and won’t have the option to say “no” and remain standard-compliant).
2. If pip has concerns about a provider, such that we aren’t willing to vendor it, it won’t get added to the blessed list.

Option (1) takes autonomy away from individual projects, and gives it to whoever maintains the list of blessed providers (even if this is the PPC, that’s more authority than the PPC normally has, as they don’t generally have the right to interfere in individual projects’ governance). On the other hand, option (2) effectively gives every project a veto over any new providers. Neither of these seem ideal.

In reality, I expect the list of providers will be non-controversial\[1\], so this is going to be a fairly rare issue. But I’d rather we chose a position now, while no-one has a vested interest in a particular outcome.

* * *

1. Up to a point - I can imagine projects with strong anti-AI stances for example being unhappy with a provider that is developed using AI assistance…

---

<div class="post-metadata">

**Author:** ![konstin](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/konstin/32/20207_2.png) [@konstin](https://discuss.python.org/u/konstin)\
**Post date:** [November 11, 2026, 8:35am UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/8 "2026-11-11T08:35:11Z")

</div>

In case of such conflicts, the Packaging Council acts as arbiter to decide what is official and what isn’t. This functions the same as a regular PEP adding changing platform and hardware support rules, where projects are similarly required support certain detection and emit specific values for it.

---

<div class="post-metadata">

**Author:** ![mgorny](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/mgorny/32/34029_2.png) [@mgorny](https://discuss.python.org/u/mgorny)\
**Post date:** [November 11, 2026, 12:08pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/9 "2026-11-11T12:08:45Z")

</div>

> [@pf\_moore](#):
>
> I’d like to understand the direction of the requirement here. Which of the following is being proposed?
> 
> 1. If a provider gets added to the list of blessed providers, pip (for example) will be required to vendor it (and won’t have the option to say “no” and remain standard-compliant).
> 2. If pip has concerns about a provider, such that we aren’t willing to vendor it, it won’t get added to the blessed list.

To extend what @konstin said, I think it’s a bit of both. If pip has concerns, these concerns may suffice to reject it. If there is no agreement, PPC will decide. Once PPC decides to add it, pip will have to vendor it.

That said, I think all blessed providers will be a single bundle, so we wouldn’t really be asking pip to vendor many different packages, but rather to vendor the whole bundle.

In the end, it isn’t that different from other packages currently vendored by pip, such as `packaging`. I mean, you can technically decide to stop using it over some decision, and reinvent the wheel, but how likely is that to happen?

---

<div class="post-metadata">

**Author:** ![pf\_moore](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pf_moore/32/35_2.png) [@pf\_moore](https://discuss.python.org/u/pf_moore)\
**Post date:** [November 11, 2026, 1:46pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/10 "2026-11-11T13:46:20Z")

</div>

> [@mgorny](#):
>
> That said, I think all blessed providers will be a single bundle, so we wouldn’t really be asking pip to vendor many different packages, but rather to vendor the whole bundle.

To be honest, I’m assuming that the variant providers would be vendored/used by `packaging`, so pip wouldn’t have an opinion directly (the same as for manylinux).

> [@mgorny](#):
>
> Once PPC decides to add it, pip will have to vendor it.

Or reimplement it (to quote the original post by @konsti). I assume uv will be doing a lot of reimplementing (in Rust), for example. Should we therefore not be framing the discussion around having a set of blessed _specifications_ for how variant support is calculated, with reference implementations (in pure Python) intended to be used by the majority of clients? Because if vendoring isn’t an option (for whatever reason!) then we don’t want to require tools to reverse engineer the official implementation to implement support - if nothing else, that puts way too much pressure on the people writing the official implementation to not have bugs (because any bugs will become de facto requirements once a reimplementation copies them).

To put this another way - I’m extremely happy that the variant PEPs will require that detection code is made available and maintained by domain experts, so that tool vendors don’t have to write their own. But I’m a lot _less_ happy if that turns into some sort of vendor lock-in, where there’s no way to understand how a variant is detected apart from by reading the reference implementation.

There are many reasons people might not be able to use the reference implementations. Licensing is the most obvious one (presumably reference implementations will be prohibited from using the GPL because of the viral nature of that license?). There’s also policy matters (should reference implementations be banned from using LLMs to generate code, because some projects might have strict policies around AI usage?).

I’m sure that in nearly all cases (and specifically in the case of pip), having a blessed reference bundle of the required providers will be perfectly fine. Tools will simply use that bundle (hopefully by just continuing to depend on `packaging`) and everything will work. I’m just trying to ensure that we don’t forget that small minority of cases where tools have stricter, or more unusual, requirements.

---

<div class="post-metadata">

**Author:** ![mgorny](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/mgorny/32/34029_2.png) [@mgorny](https://discuss.python.org/u/mgorny)\
**Post date:** [November 11, 2026, 2:02pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/11 "2026-11-11T14:02:00Z")

</div>

> [@pf\_moore](#):
>
> Should we therefore not be framing the discussion around having a set of blessed _specifications_ for how variant support is calculated, with reference implementations (in pure Python) intended to be used by the majority of clients?

Sure. This isn’t part of the original post, but I have already a local update including the requirement that the interface and behavior is fully documented.

> [@pf\_moore](#):
>
> Licensing is the most obvious one (presumably reference implementations will be prohibited from using the GPL because of the viral nature of that license?).

This is already included in post zero.

> [@pf\_moore](#):
>
> There’s also policy matters (should reference implementations be banned from using LLMs to generate code, because some projects might have strict policies around AI usage?).

That’s actually a good idea, though technically someone could argue they can rewrite the implementation. But then, you’re asking people to either read slop code or read slop documentation, and neither is going to truly meet the requirement.

---

<div class="post-metadata">

**Author:** ![rgommers](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/rgommers/32/837_2.png) [@rgommers](https://discuss.python.org/u/rgommers)\
**Post date:** [November 11, 2026, 2:37pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/12 "2026-11-11T14:37:51Z")

</div>

> [@pf\_moore](#):
>
> I’m just trying to ensure that we don’t forget that small minority of cases where tools have stricter, or more unusual, requirements.

I think for most of the questions you brought up, the answer is essentially “the same as for `packaging`”. E.g., for LLM usage - a decent amount of code that’s LLM-generated/assisted has already gone into `packaging`, and that doesn’t seem to be a problem for anyone so far. That said, it’d be great if all such code in all projects at/near the base of the packaging tooling ecosystem would fix its PR templates so all such code is at least clearly marked.

> [@pf\_moore](#):
>
> To be honest, I’m assuming that the variant providers would be vendored/used by `packaging`, so pip wouldn’t have an opinion directly (the same as for manylinux).

I think that this will be up to the `packaging` maintainers later on, but either way it doesn’t materially change the approach to security or vendoring/reimplementing.

---

<div class="post-metadata">

**Author:** ![pf\_moore](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pf_moore/32/35_2.png) [@pf\_moore](https://discuss.python.org/u/pf_moore)\
**Post date:** [November 11, 2026, 4:22pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/13 "2026-11-11T16:22:50Z")

</div>

> [@rgommers](#):
>
> I think that this will be up to the `packaging` maintainers later on, but either way it doesn’t materially change the approach to security or vendoring/reimplementing.

Agreed, it doesn’t change the situation in principle. In practice there’s a difference, though, in that as a pip maintainer I have a certain level of trust in the packaging maintainers. Trust in variant provider developers is yet to be established (and still needs to be, even if there’s an officially approved bundle of provider code\[1\]). That’s a social distinction, not a technical one, though.

One of the reasons I’m so keen on the provider detection being in packaging is that I get to dump the question of trust on them, rather than having to take it on myself 🙂

My questions have been answered, though, so let’s not prolong this digression 🙂

* * *

1. I trust the PPC on the matter of standards and specifications, but I don’t expect them to do code review, so their involvement doesn’t affect this

---

<div class="post-metadata">

**Author:** ![notatallshaw](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/notatallshaw/32/10861_2.png) [@notatallshaw](https://discuss.python.org/u/notatallshaw)\
**Post date:** [November 11, 2026, 6:45pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/14 "2026-11-11T18:45:11Z")

</div>

> [@konstin](#):
>
> How the installer ships the code is left to the tool: It can vendor them, like pip vendors packaging, it can reimplement them, like uv reimplements packages, it can use any secure mechanism of the tool author’s choice.

Sorry if I’m missing some other obvious point made elsewhere, but I’m not quite sure I’m parsing this correctly, is it intended these reference implementations will be published as Python packages on PyPI?

---

<div class="post-metadata">

**Author:** ![konstin](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/konstin/32/20207_2.png) [@konstin](https://discuss.python.org/u/konstin)\
**Post date:** [November 11, 2026, 8:52pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/15 "2026-11-11T20:52:15Z")

</div>

Yes, there will be a way to install the vendored providers from PyPI. We’re currently publishing the [wheelnext · GitHub](https://github.com/wheelnext/) ones as individual packages, but we’ll probably want to bundle them up into a single package, or maybe even put into packaging entirely (as someone who doesn’t use the PyPI version anyway I don’t have strong opinions on this point)? This plan is also inspired by packaging.

---

<div class="post-metadata">

**Author:** ![notatallshaw](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/notatallshaw/32/10861_2.png) [@notatallshaw](https://discuss.python.org/u/notatallshaw)\
**Post date:** [November 11, 2026, 10:34pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/16 "2026-11-11T22:34:01Z")

</div>

Great.

Putting on my nab author hat, in the context of it’s security philosophy (anything even possibly risky is opt-in, e.g. git) and it’s “limited” universal resolution (users have to explicitly opt-in to all resolution dimensions and nab gives no more than needed), I will need to figure out how to expose and have users be able to opt-in to different variant providers and expose what axis’s the providers allow for. I would hope even for “blessed providers” the library that calls the code allows me to opt-out, and not call/import any code of the providers when not needed.

Putting on my packaging maintainer hat, I would avoid vendoring. Vendoring is pain for a number of reasons, one of them being we have a cadence issue with other tools that vendor packaging. E.g. a bug fix can land in packaging, and then it take 6+ months for it to make it’s way to pip. It could easily turn into a 9+ months issue for bug fix in provider, vendor in packaging, release in packaging, vendor in pip, release in pip.

---

<div class="post-metadata">

**Author:** ![cjames23](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/cjames23/32/32376_2.png) [@cjames23](https://discuss.python.org/u/cjames23)\
**Post date:** [November 11, 2026, 10:57pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/17 "2026-11-11T22:57:34Z")

</div>

> [@notatallshaw](#):
>
> Putting on my packaging maintainer hat, I would avoid vendoring. Vendoring is pain for a number of reasons, one of them being we have a cadence issue with other tools that vendor packaging. E.g. a bug fix can land in packaging, and then it take 6+ months for it to make it’s way to pip. It could easily turn into a 9+ months issue for bug fix in provider, vendor in packaging, release in packaging, vendor in pip, release in pip

I don’t have anything to add to this other than a heavy plus 1 on if we can avoid vendoring I would prefer that.

---

<div class="post-metadata">

**Author:** ![pf\_moore](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pf_moore/32/35_2.png) [@pf\_moore](https://discuss.python.org/u/pf_moore)\
**Post date:** [November 11, 2026, 11:19pm UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/18 "2026-11-11T23:19:14Z")

</div>

> [@cjames23](#):
>
> I don’t have anything to add to this other than a heavy plus 1 on if we can avoid vendoring I would prefer that.

Agreed. Pip has unavoidable constraints that mean we have little choice other than vendoring, but it should not be the norm.

---

<div class="post-metadata">

**Author:** ![rgommers](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/rgommers/32/837_2.png) [@rgommers](https://discuss.python.org/u/rgommers)\
**Post date:** [November 12, 2026, 9:39am UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/19 "2026-11-12T09:39:58Z")

</div>

> [@notatallshaw](#):
>
> I would hope even for “blessed providers” the library that calls the code allows me to opt-out, and not call/import any code of the providers when not needed.

Looking at `nab`, it seems a lot of functionality is opt-in, and it isn’t an installer that aims to be fully standards-compliant (more like a very modular lock file generator?). If platform support like `linux_x86_64` and `macos_arm64` as well as resolving sdist-only packages is opt-in through `tool.nab` config, I don’t see a problem with having config to enable/disable specific variant providers. The one thing I’d suggest is that you do not generate _wrong_ answers, so in case you do decide to make a provider opt-in rather than opt-out (which isn’t a given based on what you wrote, since it’s not like you let the user opt in to a dependency like `packaging`) then you should probably error out rather than ignore variant wheels when you do encounter such a provider.

Either way, PEP 850 has [explicit interfaces](https://peps.python.org/pep-0850/#plugin-interface) to call a provider, and which providers are declared by the package is static metadata, so you should have everything you need to configure the behavior here with whatever level of granularity you prefer.

---

<div class="post-metadata">

**Author:** ![rgommers](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/rgommers/32/837_2.png) [@rgommers](https://discuss.python.org/u/rgommers)\
**Post date:** [November 12, 2026, 10:12am UTC](https://discuss.python.org/t/security-of-wheel-variants/109569/20 "2026-11-12T10:12:03Z")

</div>

> [@notatallshaw](#):
>
> Putting on my packaging maintainer hat, I would avoid vendoring […] then it take 6+ months […]

That sounds right to me. The mental model I use is based on two close analogies:

1. For the review, release and potential risks of more complex code dealing with hardware detection, treat what variant providers do similar to `manylinux`/`musllinux` detection code.
2. For how tools support providers, they should probably do whatever they do for `packaging`.

The “actually vendor the code” approach is quite `pip`-specific, and I wouldn’t expect it to be the default for other tools. `uv` reimplements everything; build backends and other tools tend to depend on `packaging` with a lower bound only (e.g., `dependencies = ['packaging >= 24.2']`). So if they do the same for `new_package_with_blessed_providers`, any bug fixes will propagate quickly.

That said, it’s a tool choice. E.g. `scikit-build-core` and `pdm` vendor `pyproject-metadata` while `meson-python` has a dependency on it. So the former two tools guard better against regressions, while getting bug fixes slower. Pick your poison I guess.🙂 From an implementers perspective, we should ensure all those options are on the table, so tool authors can make the choice that suits them best. And I’d expect it to evolve over time, just like I think eventually `scikit-build-core` and `pdm` will stop vendoring `pyproject-metadata`\[1\].

* * *

1. Either because their trust level has gone up enough, or because `pyproject-metadata` gets moved into `packaging`

[Next page](https://discuss.python.org/t/security-of-wheel-variants/109569.md?page=2)
