Skip to content

[WheelVariants] Allow static metadata to override all provider plugin logic #42

Description

@zanieb

👋

@DEKHTIARJonathan and I were talking about this at PyCon, so I'm posting a thread here.

Recently, the project has gone from user-installed provider plugins, to package-defined provider plugins. I think this is a great improvement for usability — most users will not want to reason about what providers plugins they need. However, this introduces concerns about attack surface. Now, even if you're only using binary distributions, you must invoke third-party code at install time in order to select an appropriate distribution.

As a solution to this, I think the specification should allow for a manual list of variants to override all of the provider logic. If the user opts-in to providing this list, no provider plugins will be used.

The mechanism for providing this list shouldn't be a part of the specification. This will be a user-experience consideration for tooling. For example, tools could support workflows where:

  • You explicitly pip install <plugin> and those are detected at install-time and used to generate the static list
  • You enumerate a list of plugins in your pyproject.toml, and those are installed and queried at install time instead
  • You enumerate a list of plugins in some system-level file, and invoke a tool once to write the static list to a file on boot — other tools can choose to read this file

As a nice property, something like the last case also addresses concerns about slowing down installation due to provider queries.

cc @charliermarsh @geofft @mgorny

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions