Skip to content

Conversation

@DEKHTIARJonathan
Copy link
Member

No description provided.

mgorny and others added 23 commits November 27, 2025 18:58
Done via:

```
m2r2 --no-underscore-emphasis pepxxx_wheel_variant_support.md
```

Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
The pandoc's conversion is much better.

Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Konstantin Schütze <[email protected]>,
Ralf Gommers <[email protected]>,
Andrey Talman <[email protected]>,
Charlie Marsh <[email protected]>,

Choose a reason for hiding this comment

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

Nit: Do you mind using [email protected] (if not [email protected])?

Copy link

@mgorny mgorny Dec 2, 2025

Choose a reason for hiding this comment

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

I'm fine with either, I think I've copied that from your commit messages. Just tell me which one you prefer (or "suggest" a change).


1. If ``install-time`` is true, the dictionary describes an install-time
provider and the ``requires`` key must be present and specify at
least one dependency.

Choose a reason for hiding this comment

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

Because that "one dependency" is, presumedly, the Python package containing the provider itself?

Copy link

Choose a reason for hiding this comment

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

Yes. It's basically "empty requires make no sense because then you don't have anything to call".

mgorny and others added 2 commits December 2, 2025 11:13
mgorny added a commit that referenced this pull request Dec 2, 2025
mgorny added a commit that referenced this pull request Dec 2, 2025
@rgommers
Copy link

rgommers commented Dec 4, 2025

Very nice and detailed review @emmatyping-nv. One remark on it:

It'd be good to differentiate installer from resolver and be consistent about that throughout the text.

This doesn't look like a good idea to me. A resolver isn't a standalone tool/package/thing from a packaging perspective, it's a component inside an installer. The relevant tools are "build backend", "build frontend", "installer". The term "resolver" doesn't seem used at all right now except for in a single section under Rejected Ideas, which seems fine.

mgorny added a commit that referenced this pull request Dec 4, 2025
@mgorny
Copy link

mgorny commented Dec 4, 2025

I've already replied to specific comments, but I think these two points are worth discussing top-level:

It'd be good to differentiate installer from resolver and be consistent about that throughout the text.

I think the PEP as it stands right now roughly splits tools into "installers" and "everything else". The boundary between the two is a bit blurry, and I don't think we're really following it consistently.

The primary idea behind "installers" is that these are packages that need to be able to determine whether variant wheels are supported, and may be executed with elevated privileges. Therefore, from the security PoV there is a risk that variant wheels would require installing and running arbitrary packages with these privileges. The "everything else" is basically tools where we don't worry about that — e.g. tools that only need to process wheels without determining whether they are supported, or build tools that install and run arbitrary packages anyway.

I suppose "installers" is a bit of a misnomer, since there are technically other tools that need to determine whether wheels can be installed. However, I don't think "resolver" is a good replacement. I mean, saying that "resolver should vendor a plugin" is weird — the installer does that, resolver is merely one of its components. Furthermore, the same applies to cases where resolver isn't really used, e.g. when installing a wheel from the local filesystem.

I'm open to improving things, but I don't really have a better term than "installer", and I'm not sure if using a strictly more correct term won't make things harder to comprehend.

In the overview of the specification, there is a lot of discussion of mitigations and security measures that should be taken, but no discussion of what the security risks are and what the threat model is. People will want to see an acknowledgement of the risks, probably more than the current Security implications section.

Indeed. Probably the "security considerations" section needs to be rewritten to make the problem clearer. I wonder if it would make sense to move it prior to specification; describe the problem there, then the measures taken in the specification part.

@emmatyping-nv
Copy link

A resolver isn't a standalone tool/package/thing from a packaging perspective, it's a component inside an installer. The relevant tools are "build backend", "build frontend", "installer".

Since resolvers are part of other tools like lockfile generators (e.g. pip-tools), I view resolvers as a component shared between installers and lockfile generators. Resolvers are used elsewhere too (e.g. tools to check licenses of various dependencies, etc.).

I think the PEP as it stands right now roughly splits tools into "installers" and "everything else". The boundary between the two is a bit blurry, and I don't think we're really following it consistently.

Yeah I think my main point is that the PEP makes specifications about package resolution, but tools other than installers do that.

However, I don't think "resolver" is a good replacement. I mean, saying that "resolver should vendor a plugin" is weird — the installer does that, resolver is merely one of its components.

One thing we could do is define "resolvers" as "tools which has a package resolution step". Or even use "resolver tools" (but maybe that is verbose).

Indeed. Probably the "security considerations" section needs to be rewritten to make the problem clearer. I wonder if it would make sense to move it prior to specification; describe the problem there, then the measures taken in the specification part.

I agree this seems like an improvement! Generally people don't move the sections around, but I think that should be fine since it is important to the flow of the PEP. We could also have a security section in the rationale I suppose.

mgorny and others added 2 commits December 4, 2025 18:50
* Update the bit about SciPy

Thanks to @rgommers in
#6 (comment).

Signed-off-by: Michał Górny <[email protected]>

* Sync quotes from wheelnext/wheelnext#110

Signed-off-by: Michał Górny <[email protected]>
mgorny added a commit that referenced this pull request Dec 4, 2025
mgorny added a commit that referenced this pull request Dec 4, 2025
@mgorny
Copy link

mgorny commented Dec 4, 2025

I'll prepare an update for the security-related stuff tomorrow.

mgorny and others added 8 commits December 5, 2025 16:23
Don't use tool-specific option, mention the caching problem and better describe why it's no build isolation.
The regular spaces are ASCII characters, while the non-breaking spaces are special Unicode characters. There's no need in our text to use non-breaking spaces, such as there would be with SI units.
Signed-off-by: Michał Górny <[email protected]>
@wheelnext wheelnext deleted a comment from emmatyping-nv Dec 5, 2025
Copy link

@konstin konstin left a comment

Choose a reason for hiding this comment

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

Adding some notes, filed PRs for some others.

- A **variant provider plugin** interface that allows installers to dynamically detect
platform attributes and select the most suitable wheel.

The goal is to simplify the user experience to a familiar
Copy link

Choose a reason for hiding this comment

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

The abstract is already long, I'd cut the paragraph below

a significant portion of respondents over the last years have been
successively using Python for scientific computing purposes, covering
such areas as Data analysis (steadily over 40% respondents), Machine
learning (grown to 40% in 2024), Data engineering (around 30%), and
Copy link

Choose a reason for hiding this comment

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

nit: Drop the "many more", three examples is good

``manylinux_2_34_x86_64`` now implicitly requires ``x86_64-v2`` with no
support for other x86 version. This lack of support results in
complexity in managing platform-specific dependencies and compatibility.
That complexity affects the installation process for users and increases
Copy link

Choose a reason for hiding this comment

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

The problem here is really that it's impossible to express any or different x86_64 versions, so you have to pick an oldest version you support and ship only that.

Comment on lines +107 to +111
As illustrated by
`archspec <https://github.com/archspec/archspec>`__’s authors and
maintainers, the ability to optimize a package for a specific
architecture can lead to significant performance improvement (and often
also reduce power requirements, etc.).
Copy link

Choose a reason for hiding this comment

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

Suggested change
As illustrated by
`archspec <https://github.com/archspec/archspec>`__’s authors and
maintainers, the ability to optimize a package for a specific
architecture can lead to significant performance improvement (and often
also reduce power requirements, etc.).
As illustrated by
`archspec <https://github.com/archspec/archspec>`__, the ability to
optimize a package for a specific architecture can lead to a
significant performance improvement.

slightly. The last two bars are labeled "skylake_avx512" and
"cascadelake" (both "AVX512") and reach almost 2.0 ns/day.

GROMACS AVX512 Benchmark
Copy link

Choose a reason for hiding this comment

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

What's the GROMACS benchmark, and what do the numbers refer to? The figure description should contain a concise description of what is being measured, just enough for a Python programmer who hasn't heard GROMACS before to understand the impact.

Current workarounds and their limitations
-----------------------------------------

Package maintainers have developed various strategies to work around
Copy link

Choose a reason for hiding this comment

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

I'd drop these three paragraphs, this information should emerge from the description of the workarounds, and should otherwise already be understood by the PEP reader.

**Development Tool Complications**: Installation tools, IDEs, and CI/CD
systems struggle to handle non-standard installation requirements.

**Documentation Burden**: Maintainers must create and maintain complex
Copy link

Choose a reason for hiding this comment

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

I would replace this with it being error prone. At least I haven't heard complaints about this being too much effort to document, but i've seen many cases in which those custom workarounds broke, from the pytorch index missing hashes over nvidia packages downloading the wrong artifact on the tooling side to so many complaints about installing GPU packages on the user side.

has that he expects will be addressed by wheel variants:

* Large download size, due to the use of "fat binaries" for multiple
SMs. Currently, XGBoost builds for 11 different SMs.
Copy link

Choose a reason for hiding this comment

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

We haven't introduces SMs at this point

.. code:: json5

{
// TODO: replace this with appendix URL for the PEP
Copy link

Choose a reason for hiding this comment

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

Suggested change
// TODO: replace this with appendix URL for the PEP
// The schema URL will be replaced with the final URL on packaging.python.org

Comment on lines +1455 to +1456
specification. The link to this file must be present on all index pages
where the variant wheels are linked.
Copy link

Choose a reason for hiding this comment

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

We treat the variants json file like an archive file (not like a .metadata file), it's a regular top level enty, including having a hash. I'll file a PR.

mgorny and others added 9 commits December 5, 2025 21:08
Not sure if we should do that as part of the PEP submission, but we are
using lexers available since 2.19.0, as @konstin noticed.

Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
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.

8 participants