It’s not. I’ll come back to this point.
First of all, I’d like to say that I think the focus on vendoring here is becoming a distraction, and we risk ignoring the rest of the proposal as a result. PEP 817 is a big, complex proposal, addressing an important problem, and it deserves thorough and careful review. I genuinely hope that we can find a good solution here, but we’re not going to do that if everyone burns out on one aspect of the discussion before looking at anything else.
As I understand it, the “vendoring” discussion is looking at one specific part of the puzzle here - namely that this proposal changes the existing expectation that selecting a wheel from a set of candidates can be done statically, without any need to run “3rd party” code.
That’s a trust issue, and as such is in some very fundamental ways, not a technical question. We need to understand what end users (and in particular, security-focused end users) consider to be trusted code in any of the various contexts where “selecting the correct wheel” is the problem. Installation is the obvious candidate here, but other possibilities exist - auditing and code review tools are another one, for example.
The problem with seeing “vendoring” as a solution is that it suggests a change in who is being trusted - the trust users place in the installer (for example) is being extended to the packages that the installer vendors. But this is mistaken - not all vendoring models extend trust to cover vendored code, and pip’s in particular does not. For pip, vendoring is purely a distribution mechanism to handle bootstrapping - vendored packages are neither more nor less trustworthy than normal dependencies.
IMO, vendoring is irrelevant here. Whether pip (or any other tool) vendors variant plugins should make no difference to the trust model, or to the PEP. It’s entirely a tool-specific implementation detail, and must be treated as such.
Clarifying some of my earlier points (thanks to @rgommers for fishing these out of the old thread), while acknowledging that my thinking may have changed since I originally posted them:
Speaking personally, I’d be against including the code (in the sense of being responsible for it ourselves) but vendoring is much more plausible.
Note that I’m using vendoring here in direct contrast to “being responsible for it (the code)”. Specifically, vendoring “is much more plausible” because it doesn’t imply responsibility. That matches my comment above, that vendoring shouldn’t suggest trust.
Your points all apply, but if I’m trading them off against the risks and problems around adding a mechanism whereby pip downloads and installs plugins on demand, based on package metadata, then I’d be willing to consider vendoring.
Again, this is a technical view. Vendoring is simpler for pip to implement, and therefore involves less risk (of bugs in the implementation mechanism). It doesn’t change how pip treats plugins in terms of ownership or trust.
I think the proposal should require specific designs from installers. […] should selectors be downloaded and invoked dynamically, or should they be static based on a fixed whitelist?
Note that this isn’t looking at vendoring directly. It’s pointing out that the PEP should specify a design that solves the trust issues, and tools implementing the PEP should follow that design in order to ensure that they correctly handle trust. From what I recall, this statement was in response to the idea that it should be a tool choice how to handle trust (i.e., tools should make the decision as to whether dynamic invocation of plugins is safe). I don’t think the PEP can delegate a question as important as trust and security to individual tools.
Vendoring is an implementation choice orthogonal to questions of a trust-focused design. This is because, as I noted above, projects can have differing vendoring policies, with wildly different trust implications. Pip accepts no extra responsibility for vendored dependencies, whereas uv’s version of vendoring is reimplementation in Rust, which naturally takes full responsibility for the resulting code.