Skip to content

PEP xxxx: Providers [rebased] - #79

Closed
mgorny wants to merge 56 commits into
pep-825-integrationfrom
pep-providers
Closed

mgorny wants to merge 56 commits into
pep-825-integrationfrom
pep-providers

Conversation

@mgorny

@mgorny mgorny commented Aug 12, 2026

Copy link
Copy Markdown

Unfortunately, I didn't notice that #40 was based on the pep-wheel-variants-acceptance branch before deleting it, so it ended up closing with no option to reopen it. I'm opening a new thread to continue working on it. I think all the comments from the previous thread have been addressed, and I've rebased it on the current PEP 825 state (per the integration branch). I still need to sync it to the changes in 825.

@read-the-docs-community

read-the-docs-community Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

@mgorny
mgorny marked this pull request as ready for review August 12, 2026 13:25
@mgorny

mgorny commented Aug 12, 2026

Copy link
Copy Markdown
Author

Updated the schema, added consistency notes, and ready for another round of review.

Comment thread peps/pep-9999.rst Outdated
@mgorny

mgorny commented Aug 12, 2026

Copy link
Copy Markdown
Author

Okay, I'm done rereading and updating it.

@rgommers

Copy link
Copy Markdown

Something I just noticed: the text contains only an example about the index-level variants.json, and doesn't say explicitly that the provider metadata needs to be added to .dist-info/variant.json - it should.

Comment thread peps/pep-9999.rst Outdated
@konstin
konstin force-pushed the pep-825-integration branch from 3d12971 to a6278c6 Compare August 31, 2026 19:28
@mgorny
mgorny force-pushed the pep-825-integration branch 2 times, most recently from 628343c to 13318e2 Compare September 1, 2026 07:39
@mgorny
mgorny force-pushed the pep-825-integration branch 3 times, most recently from 89573f9 to 2e676f2 Compare September 7, 2026 02:20
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst
Comment thread peps/pep-9999.rst
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst Outdated
Comment thread peps/pep-9999.rst
properties would be entirely dependent on tool updates. The added
maintenance cost could lead to support for less popular variant axes not
being accepted, or lack of feature parity between different tools.

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 have a lot more material for this section from my EuroPython talk, if someone really wants hardcoded providers I can write something up, but right now this should be enough.

This is the second PEP split off PEP 817. Its focus is on how variant
properties are governed and how their compatibility is determined. This
is primarily done via opt-in plugins that are Python packages specified
in variant metadata, but can also be vendored or reimplemented by the
tools. Package maintainers and users can only supply static
compatibility data to avoid the need for plugins.

Compared to PEP 817, the provider metadata has been largely simplified
by removing all the bits deemed not strictly necessary, and provider
plugins have been made opt-in (with provisions for tools to make some of
them opt-out, at their leisure). The recommendations for governance of
opt-out providers and building variant wheels will follow in subsequent
PEPs.

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>
mgorny and others added 7 commits September 17, 2026 14:52
Signed-off-by: Michał Górny <mgorny@quansight.com>
Co-authored-by: konsti-openai <konsti@openai.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>
Co-authored-by: konsti-openai <konsti@openai.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>
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>
Signed-off-by: Michał Górny <mgorny@quansight.com>
@mgorny

mgorny commented Sep 21, 2026

Copy link
Copy Markdown
Author

Okay, I'll squash, rebase and open a PR to the peps repo. Stay tuned!

@mgorny mgorny closed this Sep 21, 2026
Comment thread peps/pep-9999.rst
to obtain the list of compatible features and feature values for every
namespace:

1. The tool SHOULD implement a way for the user to provide a static list

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 made this a MUST in PEP 817, and I believe that that is right. It cannot really be optional for installers.

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 don't think every installer needs to provide this: Imagine a intentionally minimal tool such as flit, or a company internal tool. Both get the user what they want and need, they act correctly on the protocol level. If we say MUST, we'd consider a tool that installs the correct variant wheel as wrong for missing this feature.

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 think that's going to run into strong opposition, and also clashes with use cases we accepted like "don't install for the current machine".

What I have primarily in mind though is uv/pip: installers that do resolution and aim to implement all packaging standards. I think for minimal implementations like flit/installer, I think the likelihood of implementing anything is, from high to low:

  • Nothing beyond direct <tool> install a_variant_wheel.whl
  • A static file format
  • Support for provider with install-time behavior

Stating that the more dynamic behavior is MUST while the "let the user determine it" is SHOULD seems wrong, especially when people are primarily going to be reading this with pip/uv in mind.

@konstin konstin Sep 22, 2026 •

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 believe that we get the right level with SHOULD: It's required to create the ideal experience that covers all of our use cases, but it doesn't break interoperability if you don't implement it. IMO, it would be even better to move it out of the spec section entirely and move it to a separate, non-normative section "Intended User Experience and Tool Suggestions".

As I understand it, a MUST is for something that would break interoperability or has otherwise unacceptable consequences (such as security problems). Everything else can be a SHOULD or MAY requirement: The PEP doesn't require good or even useful tools, it only requires what we need that different parts in the ecosystem can talk to each other and that certain expectations are met (e.g.: If I publish a wheel with the GPU provider, my users actually get the GPU wheel). My stance on the scope of a PEP is that it describes a problem, specifies a set of core rules, and then explains how those rules solve that problem if people build on top of them. This assumes good faith and that tool authors are experts.

A static input file isn't something that we need to get a working variant-enabled installation (and can still do a PEP for it later - I don't disagree that this will be the most popular feature for tools). I'd argue that in Python packaging, we leave the majority of scope of all features and design to the tools themselves, and that we're better off for it! It allows experimentation, evolution and competition between tools. If we write something as a MUST now, it's locked except for an arduous change process, which is a pain for tools where we got it wrong (and from experience python is so diverse, user feedback usually proves you wrong, or otherwise a few years later the best practices and requirements have changed). We should insist on the separation between interface proposal and tool behavior and avoid micromanaging tool maintainers.

@rgommers rgommers Sep 22, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

or has otherwise unacceptable consequences (such as security problems).

This is exactly what some people will argue is the consequence. "I don't want to run third-party code, hence I must have an override to be able to install this package at all".

EDIT: or, aside from security, "I need to build a portable container image".

A static input file isn't something that we need [...] We should insist on the separation between interface proposal and tool behavior and avoid micromanaging tool maintainers.

I don't think we're disagreeing here? I am not saying we need to standardize the file format or any specific UX, only that having some kind of UX (can be tool-specific) for specifying deterministically what the required features/values are for a given package install is a must-have.

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 think if you read the new The Design Space section of my PEP 817 PR, you will see what the gap is here between this SHOULD and what's written there.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'm with @konstin here. I don't think we should enforce support for features that may be absolutely useless from the particular tool's perspective, or force tool authors to deliberately stray from the specification. SHOULD is a strong enough word, given that per definition it means "you have to have a really good reason not to do that".

Comment thread peps/pep-9999.rst
Comment thread peps/pep-9999.rst
Comment thread peps/pep-9999.rst
Comment thread peps/pep-9999.rst
Comment thread peps/pep-9999.rst
@rgommers

Copy link
Copy Markdown

Thanks @mgorny and @konsti-openai. I went through after finishing with 817 updates, and this looks quite good. Added some minor comments inline. The only two comments I have that are slightly more substantial, and I think deserve adding a bit of content for, are:

  • No error behavior, need to say that if a provider errors in some way, the install process has to fail rather than silently change the answer.
  • It's not stated that caching the results from querying a provider is allowed. In 817 we had "Clarified that the value returned by get_supported_configs() may be cached." in Change History.

@mgorny

mgorny commented Sep 22, 2026

Copy link
Copy Markdown
Author

I've fixed the trivial issues. Waiting with the bigger changes until the discussion is resolved.

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.

4 participants