PEP Provider - VirtualEnv Recommendation #93
<!-- readthedocs-1176979 -->
Documentation build overview
📚 wheelnext-peps | 🛠️ Build #34755844 | 📁 Comparing dc8774fc7d546b8caf5141e1b07e23437e881d45 against latest (344e58976964e61bc206c38cc3e81742b599b5f4)
<kbd> 🔍 Preview build </kbd>
<details>
<summary>51 files changed · <code>+</code> 6 added · <code>±</code> 45 modified</summary>
<br>
+ Added
pep-0845/index.htmlpep-0846/index.htmlpep-0847/index.htmlpep-9999/index.htmlpep-0825/appendix-metadata-consistency/index.htmlpep-9999/appendix-variant-json-schema/index.html± Modified
index.htmlnumerical/index.htmlpep-0000/index.htmlpep-0426/index.htmlpep-0501/index.htmlpep-0534/index.htmlpep-0545/index.htmlpep-0585/index.htmlpep-0604/index.htmlpep-0654/index.html</details>
The (package name, version) pair is not the provider identity defined above: this PEP says that the full dependency strings together with plugin-api uniquely identify a provider (lines 98–100). Two metadata entries can therefore use the same provider package/version while requiring incompatible additional packages or different API endpoints; sharing one environment would make one provider run with the other's dependencies (or make one impossible to install). Key the environment by the complete provider identity, or otherwise preserve isolation for distinct requires/plugin-api combinations.
<!-- ccr-overview-v2 -->
Copilot review overview
🟡 Changes recommended
Environment identity must account for complete provider requirements and plugin API, not only package/version.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1 <picture><source media="(prefers-color-scheme: dark)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/medium-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/medium-v2-light.svg"><img src="https://github.githubassets.com/static/images/icons/copilot-code-review/medium-v2-light.png" alt="Medium severity" width="62" height="18" align="texttop"></picture>
<details open>
<summary><strong>Open (1)</strong></summary>
</details>
<details>
<summary><strong>What changed in this PR</strong></summary>
Updates PEP 9999 to recommend isolated virtual environments for provider plugins.
Changes:
| File | Description |
|---|---|
| peps/pep-9999.rst | Updates provider installation recommendations. |
</details>
---
💡 <a href="/wheelnext/peps/new/pep-providers?filename=.github/skills/code-review/SKILL.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add a code-review agent skill</a> or configure MCP servers for context-aware, tailored reviews. <a href="https://docs.github.com/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review?tool=webui#mcp-servers-and-agent-skills" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn more in the docs.</a>
I don't think this is a valid requirement, and it's poorly justified (in fact, no justification is given in the PEP in this change). The security story says we avoid dependencies with few exceptions, so conflicts are unlikely. Even if that wasn't the case, we require this to work without venv (or more precisely, in the single venv that tools create when building packages), hence people can't introduce conflicting dependencies.
This seems wrong indeed. What if you have a whole stack like torch <- vllm <- etc <- etc. that all need the same provider? An installer can know beforehand what provider version is needed; this requirement would force it to create four isolated envs with the same copy of the provider.
This is better left up to the tools.
mgorny
DEKHTIARJonathan
Adjustments to follow better: https://peps.python.org/pep-0517/#recommendations-for-build-frontends-non-normative
We could almost copy/paste the entire section to be fair. But at the very minimum we need this
@warsaw @emmatyping : I guess quoting PEP 517 inside the PEP is not really something people appreciate. Do you think it would be more appropriate to quote/copy the entire paragraph (with reference) from 517 here ?